Files
mash-lab/docker/database/docker-compose.yml

64 lines
1.4 KiB
YAML

services:
mariadb:
image: mariadb:11
container_name: mariadb
restart: unless-stopped
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
volumes:
- /srv/docker/database/mariadb:/var/lib/mysql
networks:
- backend
ports:
- "3306:3306"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8200"]
interval: 1m
timeout: 10s
retries: 3
postgres:
image: postgres:16
container_name: postgres
restart: unless-stopped
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
volumes:
- /srv/docker/database/postgres:/var/lib/postgresql/data
networks:
- backend
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8200"]
interval: 1m
timeout: 10s
retries: 3
adminer:
image: adminer
container_name: adminer
restart: unless-stopped
ports:
- "7605:8080"
depends_on:
- mariadb
- postgres
networks:
- frontend
- backend
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8200"]
interval: 1m
timeout: 10s
retries: 3
networks:
backend:
external: true
frontend:
external: true