- If not already done, install Docker Compose
- Create .env file based on .env.example, if you are developing and/or you are in local remove the line
SERVER_NAME=""
- Run
docker compose build --pull --no-cache
to build fresh images - Run
docker compose up
(the logs will be displayed in the current shell) or Rundocker compose up -d
to run in background - Check variable in .env :
DATABASE_URL="postgresql:https://symfony:ChangeMe@database:5432/app?serverVersion=13&charset=utf8"
- Run
docker compose exec php npm install
to install node_modules - Run
docker compose exec php npm run dev
ordocker compose exec php npm run watch
to build assets - Open
https://localhost
in your favorite web browser and accept the auto-generated TLS certificate and you are done ! - Run
docker compose down --remove-orphans
to stop the Docker containers. - Run
docker compose logs -f
to display current logs,docker compose logs -f [CONTAINER_NAME]
to display specific container's current logs
docker compose exec php bin/console make:entity
Documentation sur les relations entre les entités https://symfony.com/doc/current/doctrine/associations.html
Generation d'une migration
docker compose exec php bin/console make:migration
Jouer les migrations
docker compose exec php bin/console doctrine:migration:migrate
docker compose exec php bin/console d:m:m
Voir les requètes interprétées (sans mise à jour de la DB)
docker compose exec php bin/console doctrine:schema:update --dump-sql
docker compose exec php bin/console d:s:u --dump-sql
Executer les requètes en DB
docker compose exec php bin/console doctrine:schema:update --force
docker compose exec php bin/console d:s:u --force
docker compose exec php bin/console doctrine:fixtures:load
data-files/
├─ user-pictures/
│ ├─ ID-image.jpg
├─ media_list-pictures/
│ ├─ ID-image.jpg
├─ artist-pictures/
│ ├─ ID-image.jpg
├─ concert_hall-pictures/
│ ├─ ID-image.jpg
├─ event-pictures/
│ ├─ ID-image.jpg
├─ media-pictures/
│ ├─ ID-image.jpg