version: '3.8'
services:
  aps-ui:
    build:
      context: /volume1/social_media_bridge/aps-ui
      dockerfile: Dockerfile
    image: aps-ui:latest
    container_name: aps-ui
    restart: unless-stopped
    network_mode: host
    env_file:
      - /volume1/social_media_bridge/aps-ui/.env
    environment:
      SYNOLOGY_NAS_ROOT: /media
      UI_SLUG_MAP_PATH: /run/ui-slug-map.json
      APP_BASE_PATH: /webman/3rdparty/APSDashboard
    volumes:
      - /volume1/social_media_bridge:/media:rw
      - /volume1/social_media_bridge/aps-ui/ui-slug-map.json:/run/ui-slug-map.json:ro
      - /usr/syno/synoman/webman/authenticate.cgi:/usr/syno/authenticate.cgi:ro
    healthcheck:
      test: ["CMD", "wget", "-qO-", "http://localhost:3001/health"]
      interval: 30s
      timeout: 5s
      retries: 3
      start_period: 15s
