name: database-v0.0.1
services:
  postgres:
    image: postgres:16
    restart: always
    labels:
      logging.service: db
    environment:
      POSTGRES_DB: plakman-db
      POSTGRES_USER: plakman
      POSTGRES_PASSWORD_FILE: /run/secrets/pg_password
    secrets:
      - pg_password
    volumes:
      - /data/database_runtime:/var/lib/postgresql/data
    networks: [edge]
    logging:
      driver: json-file
      options:
        max-size: "10m"
        max-file: "5"

secrets:
  pg_password:
    file: /data/secrets/db_password

networks:
  edge:
    name: edge
    driver: bridge
