Last active
October 14, 2020 12:48
-
-
Save timrosskamp/905f77238763f8a326f910e48a863b9d to your computer and use it in GitHub Desktop.
Local PHP development with Docker
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' | |
services: | |
database: | |
image: mysql:5.7 | |
volumes: | |
- ./.docker/db-data:/var/lib/mysql | |
environment: | |
MYSQL_ROOT_PASSWORD: root | |
MYSQL_DATABASE: app | |
MYSQL_USER: app | |
MYSQL_PASSWORD: app | |
phpmyadmin: | |
image: phpmyadmin/phpmyadmin | |
ports: | |
- "81:80" | |
environment: | |
MYSQL_ROOT_PASSWORD: root | |
PMA_HOST: database | |
PMA_USER: root | |
PMA_PASSWORD: root | |
UPLOAD_LIMIT: 2G | |
web: | |
image: webdevops/php-apache-dev:7.4 | |
volumes: | |
- ./:/app | |
ports: | |
- "80:80" | |
environment: | |
WEB_DOCUMENT_ROOT: /app/public | |
PHP_DISPLAY_ERRORS: "on" | |
PHP_MEMORY_LIMIT: 2G | |
XDEBUG_REMOTE_AUTOSTART: "1" | |
XDEBUG_REMOTE_CONNECT_BACK: "0" | |
XDEBUG_REMOTE_HOST: "host.docker.internal" | |
XDEBUG_REMOTE_PORT: "9000" | |
XDEBUG_IDE_KEY: "VSCODE" |
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": "0.2.0", | |
"configurations": [{ | |
"name": "Listen for XDebug", | |
"type": "php", | |
"request": "launch", | |
"port": 9000, | |
"pathMappings": { | |
"/app": "${workspaceFolder}" | |
} | |
}] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment