First, make sure you are running the latest version of Docker and Docker Compose.
Windows is not supported, period.
On macOS, add those lines in your /etc/hosts
file:
127.0.0.1 web.localhost
127.0.0.1 phpmyadmin.web.localhost
Clone the project, move to its root directory and run:
$ cp .env.template .env
$ make up
This command will start the stack and also run the following commands in the web
service:
composer install
: installs PHP dependenciesyarn install
: installs frontend dependenciesphp bin/console doctrine:migrations:migrate --no-interaction
: runs the migration patches on the database
Once the web
service is ready, you may now run bash inside it with:
$ make bash
Here you have to run the following commands:
$ yarn dev
# builds the frontend application...
$ php bin/console doctrine:fixtures:load --append
# adds fake data in the database...
Note: a watcher is also available with yarn watch
.
$ make up
Starts the stack.
$ make down
Stops the stack
$ make bash
Runs bash inside the web
service.
Run the following command in the web
service:
$ composer run csfix && composer run cscheck && composer run phpstan
Go the web
service:
$ make bash
Create your PHP entity:
$ php bin/console make:entity
Generate the migration script:
$ php bin/console doctrine:migrations:diff
Execute the migration script to generate your db:
$ php bin/console doctrine:migrations:migrate