services:
  web-frontend:
    build:
      context: ../../../
      dockerfile: src/web/build_tools/frontend/Dockerfile
      args:
        ARGUS_BUILD_UID: ${ARGUS_BUILD_UID:-2133}
        ARGUS_BUILD_GID: ${ARGUS_BUILD_GID:-2015}
        USE_INTRANET: ${USE_INTRANET:-false}
    image: argus-web-frontend:latest
    container_name: argus-web-frontend
    environment:
      - ALERTMANAGER_BASE_PATH=/private/argus/web/frontend
      - ARGUS_BUILD_UID=${ARGUS_BUILD_UID:-2133}
      - ARGUS_BUILD_GID=${ARGUS_BUILD_GID:-2015}
    ports:
      - "${ARGUS_WEB_PORT:-8080}:80"
    volumes:
      - ${DATA_ROOT:-./data}/web:/private/argus/web/frontend
      - ${DATA_ROOT:-./data}/etc:/private/argus/etc
    networks:
      - argus-debug-net
    restart: unless-stopped
    logging:
      driver: "json-file"
      options:
        max-size: "10m"
        max-file: "3"
  web-proxy:
    build:
      context: ../../../
      dockerfile: src/web/build_tools/proxy/Dockerfile
      args:
        ARGUS_BUILD_UID: ${ARGUS_BUILD_UID:-2133}
        ARGUS_BUILD_GID: ${ARGUS_BUILD_GID:-2015}
        USE_INTRANET: ${USE_INTRANET:-false}
    image: argus-web-proxy:latest
    container_name: argus-web-proxy
    environment:
      - ARGUS_BUILD_UID=${ARGUS_BUILD_UID:-2133}
      - ARGUS_BUILD_GID=${ARGUS_BUILD_GID:-2015}
    ports:
      - "8088:80"
    volumes:
      - ${DATA_ROOT:-./data}/etc:/private/argus/etc
    networks:
      - argus-debug-net
    restart: unless-stopped
    logging:
      driver: "json-file"
      options:
        max-size: "10m"
        max-file: "3"

networks:
  argus-debug-net:
    external: true

volumes:
  web-frontend_data:
    driver: local
