mic-infra/mic/docker-compose.yml

21 lines
466 B
YAML

secrets:
db_password:
file: .secrets/db_password.txt
services:
postgres:
container_name: bot_postgres
image: postgres:latest
restart: always
volumes:
- ./postgres_data:/var/lib/postgresql/data:rw
environment:
POSTGRES_USER: mic
POSTGRES_DB: mic
POSTGRES_PASSWORD_FILE: /run/secrets/db_password
user: "${USER_ID:-1000}:${GID:-1000}"
networks:
- "127.0.0.1:5432:5432"
secrets:
- db_password