services:
  seerr:
    build:
      context: .
      dockerfile: Dockerfile.local
    ports:
      - '5055:5055'
    environment:
      DB_TYPE: 'postgres' # Which DB engine to use. The default is "sqlite". To use postgres, this needs to be set to "postgres"
      DB_HOST: 'postgres' # The host (url) of the database
      DB_PORT: '5432' # The port to connect to
      DB_USER: 'seerr' # Username used to connect to the database
      DB_PASS: 'seerr' # Password of the user used to connect to the database
      DB_NAME: 'seerr' # The name of the database to connect to
      DB_LOG_QUERIES: 'false' # Whether to log the DB queries for debugging
      DB_USE_SSL: 'false' # Whether to enable ssl for database connection
    volumes:
      - .:/app:rw,cached
      - /app/node_modules
      - /app/.next
    depends_on:
      - postgres
    links:
      - postgres
  postgres:
    image: postgres:18
    environment:
      POSTGRES_USER: seerr
      POSTGRES_PASSWORD: seerr
      POSTGRES_DB: seerr
    ports:
      - '5432:5432'
    volumes:
      - postgres:/var/lib/postgresql
volumes:
  postgres:
