Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
version: '3'
# Networks
networks:
# Internal network
internal:
driver: bridge
# Volumes
volumes:
# MySQL volume
sandbox-mysql_data:
driver: local
# Redis volume
sandbox-redis_data:
driver: local
# Services
services:
# Nginx
sandbox-nginx:
image: webdevops/php-nginx-dev:7.4
container_name: sandbox-nginx
networks:
- internal
working_dir: /var/www/app
volumes:
- .:/var/www/app
- .docker/sandbox-nginx/opt/docker/etc/nginx/vhost.common.d/cache.conf:/opt/docker/etc/nginx/vhost.common.d/cache.conf
# - .docker/sandbox-nginx/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini:/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
depends_on:
- sandbox-mysql
- sandbox-redis
environment:
- WEB_DOCUMENT_ROOT=/var/www/app/public
- PHP_DISPLAY_ERRORS=0
- PHP_MEMORY_LIMIT=2048M
- PHP_MAX_EXECUTION_TIME=300
- PHP_POST_MAX_SIZE=500M
- PHP_UPLOAD_MAX_FILESIZE=500M
- PHP_DEBUGGER="xdebug"
# - PHP_IDE_CONFIG="serverName=_"
- XDEBUG_REMOTE_AUTOSTART=On
- XDEBUG_REMOTE_CONNECT_BACK=Off
- XDEBUG_REMOTE_HOST=host.docker.internal
- XDEBUG_REMOTE_PORT=9090
- XDEBUG_PROFILER_ENABLE=Off
- PHP_DATE_TIMEZONE=UTC
expose:
- 9090
ports:
- 8080:80
# MySQL
sandbox-mysql:
image: mysql:5.7
container_name: sandbox-mysql
networks:
- internal
working_dir: /var/www/app
volumes:
- sandbox-mysql_data:/var/lib/mysql
- .:/var/www/app
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=database
- MYSQL_USER=user
- MYSQL_PASSWORD=password
ports:
- 3306:3306
# Redis
sandbox-redis:
image: redis:4.0
container_name: sandbox-redis
command: --appendonly yes
networks:
- internal
volumes:
- sandbox-redis_data:/data
ports:
- 6379:6379
# Queue SupervisorD
sandbox-queue:
image: webdevops/php-nginx:7.4
container_name: sandbox-queue
working_dir: /var/www/app
networks:
- internal
volumes:
- .:/var/www/app
- .docker/sandbox-queue/opt/docker/etc/supervisor.d/php-fpm.conf:/opt/docker/etc/supervisor.d/php-fpm.conf
depends_on:
- sandbox-mysql
- sandbox-redis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.