Skip to content
Permalink
1.12
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
services:
php:
container_name: php
build:
context: .
target: sylius_php_dev
depends_on:
- mysql
environment:
- APP_ENV=dev
- APP_DEBUG=1
- APP_SECRET=EDITME
- DATABASE_URL=mysql://sylius:${MYSQL_PASSWORD:-nopassword}@mysql/sylius
- MAILER_URL=smtp://mailhog:1025
- PHP_DATE_TIMEZONE=${PHP_DATE_TIMEZONE:-UTC}
volumes:
- .:/srv/sylius:rw,cached
# if you develop on Linux, you may use a bind-mounted host directory instead
# - ./var:/srv/sylius/var:rw
- ./public:/srv/sylius/public:rw,delegated
# if you develop on Linux, you may use a bind-mounted host directory instead
# - ./public/media:/srv/sylius/public/media:rw
- public-media:/srv/sylius/public/media:rw
mysql:
container_name: mysql
image: mysql:5.7 # Sylius is fully working on mysql 8.0 version
platform: linux/amd64
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-nopassword}
- MYSQL_DATABASE=sylius
- MYSQL_USER=sylius
- MYSQL_PASSWORD=${MYSQL_PASSWORD:-nopassword}
volumes:
- mysql-data:/var/lib/mysql:rw
# you may use a bind-mounted host directory instead, so that it is harder to accidentally remove the volume and lose all your data!
# - ./docker/mysql/data:/var/lib/mysql:rw,delegated
ports:
- "${MYSQL_PORT:-3306}:3306"
node:
container_name: node
build:
context: .
target: sylius_node
command: ["yarn", "watch"]
depends_on:
- php
environment:
- GULP_ENV=dev
- PHP_HOST=php
- PHP_PORT=9000
volumes:
- .:/srv/sylius:rw,cached
- ./public:/srv/sylius/public:rw,delegated
ports:
- "${NODE_PORT:-35729}:35729"
nginx:
container_name: nginx
build:
context: .
target: sylius_nginx
depends_on:
- php
- node # to ensure correct build order
volumes:
- ./public:/srv/sylius/public:ro
# if you develop on Linux, you may use a bind-mounted host directory instead
# - ./public/media:/srv/sylius/public/media:ro
- public-media:/srv/sylius/public/media:ro,nocopy
ports:
- "${HTTP_PORT:-80}:80"
mailhog:
# do not use in production!
image: mailhog/mailhog:latest
environment:
- MH_STORAGE=maildir
# volumes:
# - ./docker/mailhog/maildir:/maildir:rw,delegated
ports:
- "${MAILHOG_PORT:-8025}:8025"
volumes:
mysql-data:
public-media: