Created
January 15, 2020 19:04
-
-
Save wilcorrea/75c7ac0174f11d883d187982a6f69269 to your computer and use it in GitHub Desktop.
This file contains 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
export XDEBUG_REMOTE_HOST=$(ifconfig wlp6s0 | grep -oE 'inet [[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}' | cut -c6-) |
This file contains 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
DOCKER_SERVICE_API="nginx-cute" | |
DOCKER_SERVICE_API_PORT=8080 | |
DOCKER_SERVICE_DATABASE="mysql-cute" | |
DOCKER_SERVICE_DATABASE_PORT=3306 | |
DOCKER_SERVICE_DATABASE_NAME=app | |
DOCKER_SERVICE_DATABASE_USER=user | |
DOCKER_SERVICE_DATABASE_PASSWORD=password |
This file contains 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' | |
# networks | |
networks: | |
# internal network | |
internal: | |
driver: bridge | |
# volumes | |
volumes: | |
# MySQL data volume | |
app-mysql_data: | |
driver: local | |
# services | |
services: | |
# database | |
app-mysql: | |
image: mysql:5.7 | |
container_name: ${DOCKER_SERVICE_DATABASE} | |
networks: | |
- internal | |
working_dir: /var/www/app | |
volumes: | |
- app-mysql_data:/var/lib/mysql | |
- ./laravel:/var/www/app | |
environment: | |
- MYSQL_ROOT_PASSWORD=root | |
- MYSQL_DATABASE=${DOCKER_SERVICE_DATABASE_NAME} | |
- MYSQL_USER=${DOCKER_SERVICE_DATABASE_USER} | |
- MYSQL_PASSWORD=${DOCKER_SERVICE_DATABASE_PASSWORD} | |
ports: | |
- ${DOCKER_SERVICE_DATABASE_PORT}:3306 | |
# api | |
app-nginx: | |
image: webdevops/php-nginx-dev:7.3 | |
container_name: ${DOCKER_SERVICE_API} | |
networks: | |
- internal | |
working_dir: /var/www/app | |
volumes: | |
- ./laravel:/var/www/app | |
depends_on: | |
- app-mysql | |
links: | |
- app-mysql | |
environment: | |
- PHP_DEBUGGER="xdebug" | |
- WEB_DOCUMENT_ROOT=/var/www/app/public | |
- XDEBUG_REMOTE_HOST=${XDEBUG_REMOTE_HOST} | |
- XDEBUG_REMOTE_AUTOSTART=1 | |
expose: | |
- 9000 | |
ports: | |
- ${DOCKER_SERVICE_API_PORT}:80 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment