Last active
February 24, 2021 19:51
-
-
Save LucianoCharlesdeSouza/0e13080b9a685e792806e8ecc43833e2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.7' | |
# Networks | |
networks: | |
# Internal network | |
internal: | |
driver: bridge | |
# Volumes | |
volumes: | |
# MySQL volume | |
sandbox-mysql_data: | |
driver: local | |
services: | |
# api | |
sandbox-apache: | |
image: webdevops/php-apache-dev:7.4 | |
container_name: sandbox-apache | |
networks: | |
- internal | |
working_dir: /var/www/app | |
volumes: | |
- .:/var/www/app | |
depends_on: | |
- sandbox-mysql | |
environment: | |
- WEB_DOCUMENT_ROOT=/var/www/app/public | |
- PHP_DEBUGGER="xdebug" | |
- 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=0 | |
- 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 | |
# 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=root | |
ports: | |
- 3306:3306 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment