Skip to content

Instantly share code, notes, and snippets.

@guibranco
Created March 14, 2021 04:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save guibranco/8eba67902c4c8559d6904315addf9470 to your computer and use it in GitHub Desktop.
Save guibranco/8eba67902c4c8559d6904315addf9470 to your computer and use it in GitHub Desktop.
Docker compose file for AMP stack: Apache, MySQL, PHP and PHPMyAdmin
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