Skip to content

Instantly share code, notes, and snippets.

@frama21
Last active January 3, 2023 08:57
Show Gist options
  • Save frama21/170c1dbabe2338f8fd3c4eee9c26b873 to your computer and use it in GitHub Desktop.
Save frama21/170c1dbabe2338f8fd3c4eee9c26b873 to your computer and use it in GitHub Desktop.
Mysql, Postgree docker compose
# for pull mysql compose
curl -LO https://gist.githubusercontent.com/frama21/170c1dbabe2338f8fd3c4eee9c26b873/raw/6daba068b1661d416292782cb7bbb551f024636e/docker-compose-mysql.yml
# for pull postgres compose
curl -LO https://gist.githubusercontent.com/frama21/170c1dbabe2338f8fd3c4eee9c26b873/raw/6daba068b1661d416292782cb7bbb551f024636e/docker-compose-postgre.yml
# Mysql + Phpmyadmin
version: "3"
name: 'mysql-db'
networks:
app-mysql:
driver: bridge
services:
mysql:
image: mysql:latest
container_name: mysql
restart: always
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: root
networks:
- app-mysql
phpmyadmin:
image: phpmyadmin:latest
container_name: phpmyadmin
restart: always
ports:
- "80:80"
environment:
PMA_HOST: mysql
depends_on:
- mysql
networks:
- app-mysql
# Postgre + Adminer
version: "3"
name: 'postgres-db'
networks:
app-postgre:
driver: bridge
services:
postgre:
container_name: postgres
image: postgres
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: root
POSTGRES_DB: mydatabase
ports:
- 5432:5432
networks:
- app-postgre
adminer:
container_name: adminer
image: adminer
restart: always
ports:
- 8080:8080
depends_on:
- postgre
networks:
- app-postgre
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment