This is a template of a README. Adapt it according to the comments and your needs.
Replace this title and the following description with your project name and description.
A web application built with Nuxt 3, Symfony 6.4 (LTS), and Docker.
make help
This will display help
Install the latest version of Docker and Docker Compose.
Consider installing Orbstack as a drop-in replacement of Docker Desktop
This boilerplate is best to use at the start of the project
- Create your Git repository on the platform of your choice, then add a new remote to it:
git remote add boilerplate https://github.com/thecodingmachine/symfony-boilerplate.git
- pull the source code from the latest release to your current branch:
git pull boilerplate v2
- Update the .env.dist accoding to your need. Minimal configuration to update:
APP_NAME
DATABASE_PASSWORD
DATABASE_USERNAME
SF_APP_SECRET
When cloning your project, you need to
- Copy a .env.dist as a .env
- Create expected values into your "/etc/hosts"
- Copy docker-compose.override.yml.template into docker-compose.override.yml
A specific makefile task has been created:
make init-dev
You can start the project with usual docker compose command docker compose up -d
A specific makefile task has been created: make up
You can stop logging with Ctrl+C
Then, you can init the database: make reset-db
- if entities has changed, a new migration should be created
@see https://datatracker.ietf.org/doc/html/rfc7807 via symfony/serializer-pack and https://symfony.com/doc/current/controller/error_pages.html
For loggin: Monolog\Formatter\JsonFormatter (this is WIP)
The database access is configured directly via the environment variable "DATABASE_URL", In dev:
- In development
During development it is safe to assume:
db-dev-mig
working
- For production
To deploy new structures in production (IE mapping update):
-
Reset the database
make reset-db
-
Generate a migration
make db-mig-diff
-
Apply the migration
make migrate
docker run --rm --volume=`pwd`/app:/usr/src/app/:rw thecodingmachine/php:8.0-v4-apache -- bash -c "cd '/usr/src/app/' && composer create-project symfony/skeleton backend"
docker run --rm --volume=`pwd`/app/backend:/usr/src/app/:rw thecodingmachine/php:8.0-v4-apache -- bash -c "cd '/usr/src/app/' && composer require mypackage"
docker run --rm --volume=`pwd`/app/backend:/usr/src/app/:rw thecodingmachine/php:8.0-v4-apache -- bash -c "cd '/usr/src/app/' && php bin/console debug:config monolog"
https://symfony.com/doc/current/configuration.html#configuration-environments