The project can be either run:
- using the Symfony Server;
- using Docker;
- using your local PHP setup.
We will focus on the second option. The project is almost ready to be used with docker on the dev environment.
- Clone the repository.
- Create a .env.local file (or just a .env one), containing the following variables:
Variable name | Content |
---|---|
MYSQL_ROOT_PASSWORD | The Mysql root user's password |
MYSQL_USER | The Mysql user |
MYSQL_PASSWORD | The Mysql user's password |
APP_NAME | Your application's name (the back-end, not the font-end) |
GOOGLE_RECAPTCHA_V2_PUBLIC_KEY | Your Google V2 captcha public key. |
GOOGLE_RECAPTCHA_V2_PRIVATE_KEY | Your Google V2 captcha private key. |
Notes: use separates values for Google Captcha in your different environments.
- In the docker/dev folder, copy the .env.dist file to .env and define all the required variables in it.
- Now, to start the project, just run make start.
- Connect to the PHP container: make php.
- Run composer install (it will also install the assets).
- Create the DB by running make migrate_command.
- Run the following command to create fixtures: make load_fixtures_command.
- You can now log in to the admin at the /login URL, using one of the two created users:
- A regular user: JohntheRegular / somePassword123456aa
- An admin user: John / somePassword123456
You can also create a new user with the following command when inside the PHP container.
bin/console app:add-user YourPseudo YourPassword [email protected] "Marcellus Faust" --admin
- The Makefile contains a lot of useful commands. Have a look at it. For instance:
- make phpunit
- make phpcs
- make phpstan
- make stop (to stop the project properly).
- The nginx configuration file is defined to accept request to an adminer.php file (not versioned).