version: "3.8"

services:
  picsur:
    image: ghcr.io/caramelfur/picsur:latest
    restart: unless-stopped
    environment:
      PICSUR_DB_HOST: picsur_postgres
      PICSUR_DB_PORT: 5432
      PICSUR_DB_USERNAME: picsur
      PICSUR_DB_PASSWORD: ${POSTGRES_PASSWORD}
      PICSUR_DB_DATABASE: picsur
      PICSUR_ADMIN_PASSWORD: ${ADMIN_PASSWORD}
      PICSUR_JWT_SECRET: ${JWT_SECRET}
    expose:
      - 8080

  picsur_postgres:
    image: postgres:17-alpine
    restart: unless-stopped
    environment:
      POSTGRES_DB: picsur
      POSTGRES_USER: picsur
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
    volumes:
      - picsur-data:/var/lib/postgresql/data

volumes:
  picsur-data: {}
