services:
  db:
    # postgres database
    image: postgres:16-alpine
    environment:
      POSTGRES_DB: ${DB_NAME}
      POSTGRES_USER: ${DB_USER}
      POSTGRES_PASSWORD: ${DB_PASSWORD}
    ports:
      - "${DB_PORT}:5432"
    volumes:
      - postgres_data:/var/lib/postgresql/data
    restart: always

  mailpit:
    # email testing
    image: axllent/mailpit
    ports:
      - "8025:8025" # Web UI
      - "${EMAIL_PORT}:1025" # SMTP
    restart: always

volumes:
  postgres_data:
