services:

  db:
    image: postgres:18-alpine
    init: true
    environment:
      POSTGRES_DB: "gaehsnitzdb"
      POSTGRES_USER: "gaehsnitzuser"
      POSTGRES_PASSWORD: "SCKL97ukwICPpjJ9rXyhdljZ86T29A"
    expose:
      - "5432"
    volumes:
      - ./volumes/db/data:/var/lib/postgresql/data:rw

  web:
    build:
      context: .
    init: true
    environment:
      DB_HOST: "db"
      DB_PORT: "5432"
      DB_NAME: "gaehsnitzdb"
      DB_USER: "gaehsnitzuser"
      DB_PASSWORD: "SCKL97ukwICPpjJ9rXyhdljZ86T29A"
    depends_on:
      - db
    ports:
      - "80:8000"
    volumes:
      - .:/code:rw
