Docker infrastructure for Messenger Symfony project.
- Install Docker and Docker-compose
- Set
PHP_ENABLE_XDEBUGto1inservices/*/.envto enable XDebug in certain container (optional). - Build images by
docker-compose build. - Start the project by
docker-compose up -d. - Run composer install
docker-compose exec core composer install - Create database
docker-compose exec core php bin/console doctrine:database:create - Update schema
docker-compose exec core php bin/console doctrine:schema:update --force - Run migration
docker-compose exec core php bin/console doctrine:migrations:migrate - Run fixtures
docker-compose exec core php bin/console doctrine:fixtures:load - Yarn install
docker-compose exec core yarn install - Yarn build
docker-compose exec core yarn encore dev - Open the project in a browser from URL
localhost:8081.
http://localhost:8081/— Index pagelocalhost:3307— Core databaselocalhost:9005— XDebug remote port (if enabled in.env)
http://nginx:80/— Index pagedb:3306— Core database<service>:9005— XDebug remote port (if enabled in.env)