Skip to content

Instantly share code, notes, and snippets.

@lebowvsky
Last active January 9, 2024 10:23
Show Gist options
  • Save lebowvsky/e10b65edf64bd1d50318d51c7de59972 to your computer and use it in GitHub Desktop.
Save lebowvsky/e10b65edf64bd1d50318d51c7de59972 to your computer and use it in GitHub Desktop.
docker-compose to create container with mysql and phpmyadmin
version: "3"
services:
db:
image: mysql
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_PASSWORD: root
ports:
- "3306:3306"
phpmyadmin:
depends_on:
- db
image: phpmyadmin
restart: always
ports:
- "8090:80"
environment:
PMA_HOST: db
MYSQL_ROOT_PASSWORD: password
volumes:
db_data:
@lebowvsky
Copy link
Author

PhpMyAdmin exposed on port 8090

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment