Created
March 14, 2021 04:34
-
-
Save guibranco/8eba67902c4c8559d6904315addf9470 to your computer and use it in GitHub Desktop.
Docker compose file for AMP stack: Apache, MySQL, PHP and PHPMyAdmin
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.1" | |
services: | |
www: | |
build: . | |
ports: | |
- "8001:80" | |
volumes: | |
- ./:/var/www/html/ | |
networks: | |
- default | |
links: | |
- db | |
db: | |
image: mysql:5.7 | |
ports: | |
- "3306:3306" | |
command: --default-authentication-plugin=mysql_native_password | |
networks: | |
- default | |
volumes: | |
- /var/lib/mysql | |
environment: | |
MYSQL_DATABASE: test | |
MYSQL_USER: user | |
MYSQL_PASSWORD: test | |
MYSQL_ROOT_PASSWORD: test | |
phpmyadmin: | |
image: phpmyadmin/phpmyadmin | |
links: | |
- db:db | |
ports: | |
- 8000:80 | |
environment: | |
MYSQL_USER: user | |
MYSQL_PASSWORD: test | |
MYSQL_ROOT_PASSWORD: test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment