services:
  app:
    build:
      context: ../..
      dockerfile: apps/posts-go/Dockerfile
    ports:
      - "${PORT:-3000}:${PORT:-3000}"
    environment:
      - HOST=0.0.0.0
      - PORT=${PORT:-3000}
      - POSTS_DB_PATH=/data/posts-go.sqlite
      - POSTS_PASSWORD=${POSTS_PASSWORD:-changeme}
      - UPLOADS_DIR=/data/uploads
      - COOKIE_SECURE=${COOKIE_SECURE:-false}
      - SITE_URL=${SITE_URL:-http://localhost:3000}
    volumes:
      - posts-go-data:/data
    restart: unless-stopped

volumes:
  posts-go-data:
