2017 © Pedro Peláez
 

project gvq-api

API for GVQ

image

vsv-verkeerskunde/gvq-api

API for GVQ

  • Thursday, August 2, 2018
  • by LucWollants
  • Repository
  • 3 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 4 Open issues
  • 23 Versions
  • 0 % Grown

The README.md

Build Status Coverage Status Scrutinizer Code Quality Maintainability, (*1)

Seeding

Initial setup

Create a new database with settings taken from .env file:, (*2)

$ ./bin/console doctrine:database:create, (*3)

Create the tables inside this database with:, (*4)

$ ./bin/console doctrine:schema:create, (*5)

Seeding categories

Adding all fixed categories can be done with the following custom command:, (*6)

$ ./bin/console gvq:seed-categories, (*7)

With the optional file argument it is possible to specify an arbitrary file with categories., (*8)

Seeding users

Rename the included fixed_users.yaml.dist file to fixed_users.yaml or create your own data file. Adding all fixed users can be done with the following custom command:, (*9)

$ ./bin/console gvq:seed-users, (*10)

With the optional file argument it is possible to specify an arbitrary file with users., (*11)

Docker

Basics

Edit the your host file and add the following:, (*12)

127.0.0.1   gvq-api.test
127.0.0.1   mailhog.gvq-api.test
127.0.0.1   mysql.gvq-api.test
127.0.0.1   redis.gvq-api.test

Install sources by running:, (*13)

$ composer install

Start docker by running:, (*14)

$ docker-compose up -d

Connect to api on: http://gvq-api.test:8000/, (*15)

Connect to mailhog on: http://mailhog.gvq-api.test:8025/, (*16)

Connect to MySQL on: mysql.gvq-api.test:33066, (*17)

Database

Create the schema with (make sure to have correct DATABASE_URL string inside .env):, (*18)

$ docker-compose exec web bash -c "./bin/console doctrine:schema:create"

Example of DATABASE_URL with values inside .env:, (*19)

DATABASE_URL=mysql://$DB_USER:$DB_PASSWORD@$DB_HOST:3306/$DB_NAME

Seeding categories (by default taken from categories.yaml), (*20)

$ docker-compose exec web bash -c "./bin/console gvq:seed-categories"

Seeding users (make sure to provide an input file), (*21)

$ docker-compose exec web bash -c "./bin/console gvq:seed-users"

Image upload

If you want to use s3 as upload location, then change inside env:, (*22)

UPLOAD_TARGET=remote
UPLOAD_PATH=*url_to_s3_bucket*

Example:, (*23)

UPLOAD_TARGET=remote
UPLOAD_PATH=https://s3-eu-west-1.amazonaws.com/verkeersquiz-test/

and fill in the necessary credential and bucket details., (*24)

To use the local filesystem, leave the default values unchanged:, (*25)

UPLOAD_TARGET=local
UPLOAD_PATH=/uploads/

Altering styling / CSS

See the documentation in assets/README.md., (*26)

The Versions

02/05 2018

dev-feature/VSVGVQ-7

dev-feature/VSVGVQ-7

API for GVQ

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Luc Wollants
by Wim Robberechts