Skip to content

Instantly share code, notes, and snippets.

@LucianoCharlesdeSouza
Created April 30, 2021 00:54
Show Gist options
  • Save LucianoCharlesdeSouza/5f63e94e7e05859541e2547417dc7ebb to your computer and use it in GitHub Desktop.
Save LucianoCharlesdeSouza/5f63e94e7e05859541e2547417dc7ebb to your computer and use it in GitHub Desktop.
version: '3.7'
# Networks
networks:
# Internal network
internal:
driver: bridge
# Volumes
volumes:
# MySQL and PHPmyAdmin volume
sandbox-mysql_data_wc:
phpmyadmin_data_wc:
driver: local
services:
# api
sandbox-apache-wc:
image: webdevops/php-apache-dev:7.4
restart: always
container_name: sandbox-apache-wc
networks:
- internal
working_dir: /var/www/app
volumes:
- .:/var/www/app
depends_on:
- sandbox-mysql-wc
environment:
- WEB_DOCUMENT_ROOT=/var/www/app/wc/
- PHP_DEBUGGER="xdebug"
- XDEBUG_MODE=develop
- 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
- PHP_DISPLAY_ERRORS=1
- WEB_DOCUMENT_INDEX=index.php
- PHP_MEMORY_LIMIT=2048M
- PHP_MAX_EXECUTION_TIME=86400
- PHP_POST_MAX_SIZE=500M
- PHP_UPLOAD_MAX_FILESIZE=500M
expose:
- 9000
ports:
- 8080:80
sandbox-mysql-wc:
image: mysql:5.7
restart: always
container_name: sandbox-mysql-wc
networks:
- internal
working_dir: /var/www/app
volumes:
- sandbox-mysql_data_wc:/var/lib/mysql
- .:/var/www/app/
environment:
- MYSQL_DATABASE=wc
- MYSQL_USER=root
- MYSQL_PASSWORD=root
- MYSQL_ROOT_PASSWORD=root
ports:
- 3306:3306
phpmyadmin-wc:
image: phpmyadmin
restart: always
container_name: phpmyadmin-wc
networks:
- internal
depends_on:
- sandbox-mysql-wc
ports:
- 8081:80
volumes:
- phpmyadmin_data_wc:/var/www/app/
environment:
- PMA_HOST=sandbox-mysql-wc
- MYSQL_ROOT_PASSWORD=root
- PMA_ARBITRARY=1
- PMA_PORT=3306
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment