services:
  app:
    build:
      context: .
      dockerfile: Dockerfile
    container_name: gnommo-osint-board
    restart: unless-stopped
    environment:
      NODE_ENV: production
      PORT: 8787
      DATABASE_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@gnommo-db:5432/${POSTGRES_DB}
      CORS_ORIGIN: https://osint.${DOMAIN}
      JWT_SECRET: ${JWT_SECRET}
      LEVEL_EDITING_ENABLED: ${LEVEL_EDITING_ENABLED:-false}
      MAX_DOCUMENT_BYTES: ${MAX_DOCUMENT_BYTES:-26214400}
      OCR_ENABLED: ${OCR_ENABLED:-true}
      OCR_LANGUAGES: ${OCR_LANGUAGES:-nor+eng}
      OCR_TIMEOUT_MS: ${OCR_TIMEOUT_MS:-20000}
      MAX_OCR_BYTES: ${MAX_OCR_BYTES:-15728640}
      MAX_EXTRACTED_TEXT_CHARACTERS: ${MAX_EXTRACTED_TEXT_CHARACTERS:-200000}
    expose:
      - "8787"
    networks:
      - default
      - gnommo

networks:
  default: {}
  gnommo:
    external: true
