

networks:
  DOCKER_NETWORK_DATA: #LIBREPORTAL|DOCKER_NETWORK_TAG|DOCKER_NETWORK_DATA
    external: true

services:
  libreportal-service: #LIBREPORTAL|SERVICE_TAG_1|libreportal-service
    container_name: libreportal-service
    build:
      context: .
    image: libreportal-service:latest
    user: "USER_DATA" #LIBREPORTAL|USER_TAG|USER_DATA
    group_add:
      - SOCKET_GID_DATA #LIBREPORTAL|SOCKET_GID_TAG|SOCKET_GID_DATA
    ports:
      - "PORTS_DATA_1" #LIBREPORTAL|PORTS_TAG_1|PORTS_DATA_1
    volumes:
      - ./frontend:/app/frontend
      - ./backend/routes:/app/backend/routes
      - ./backend/utils:/app/backend/utils
      - ./backend/server.js:/app/backend/server.js
      - ./libreportal.config:/app/libreportal.config:ro
      - ../../configs/webui/webui_logins:/app/webui_logins:ro
      - ../../configs/webui/webui_logs:/app/webui_logs:ro
      # >>> crowdsec-host-logs >>>
      #- /var/log/crowdsec.log:/host/var/log/crowdsec.log:ro
      #- /var/log/crowdsec-firewall-bouncer.log:/host/var/log/crowdsec-firewall-bouncer.log:ro
      # <<< crowdsec-host-logs <<<
      - SOCKET_DATA #LIBREPORTAL|SOCKET_TAG|SOCKET_DATA
    environment:
      FRONTEND_PATH: /data/frontend
      LIBREPORTAL_CONFIG_PATH: /app/libreportal.config
      TZ: TIMEZONE_DATA #LIBREPORTAL|TIMEZONE_TAG|TIMEZONE_DATA
    labels:
      libreportal.category: "CATEGORY_DATA" #LIBREPORTAL|CATEGORY_TAG|CATEGORY_DATA
      libreportal.title: "TITLE_DATA" #LIBREPORTAL|TITLE_TAG|TITLE_DATA
      traefik.enable: TRAEFIK_ENABLE_DATA #LIBREPORTAL|TRAEFIK_ENABLE_TAG|TRAEFIK_ENABLE_DATA
      # TRAEFIK_PORT_1_BEGIN
      traefik.http.routers.libreportal-service.entrypoints: web,websecure
      traefik.http.routers.libreportal-service.rule: Host(`DOMAINSUBNAME_DATA_1`) #LIBREPORTAL|DOMAINSUBNAME_TAG_1|DOMAINSUBNAME_DATA_1
      traefik.http.routers.libreportal-service.tls: true
      traefik.http.routers.libreportal-service.tls.certresolver: production
      traefik.http.services.libreportal-service.loadbalancer.server.port: PORT_INTERNAL_DATA_1 #LIBREPORTAL|PORT_INTERNAL_TAG_1|PORT_INTERNAL_DATA_1
      traefik.http.routers.libreportal-service.middlewares: MIDDLEWARE_DATA_1 #LIBREPORTAL|MIDDLEWARE_TAG_1|MIDDLEWARE_DATA_1
      # TRAEFIK_PORT_1_END
      traefik.docker.network: DOCKER_NETWORK_DATA #LIBREPORTAL|DOCKER_NETWORK_TAG|DOCKER_NETWORK_DATA
    healthcheck:
      disable: HEALTHCHECK_DATA #LIBREPORTAL|HEALTHCHECK_TAG|HEALTHCHECK_DATA
    networks:
      DOCKER_NETWORK_DATA: #LIBREPORTAL|DOCKER_NETWORK_TAG|DOCKER_NETWORK_DATA
        ipv4_address: IP_DATA_1 #LIBREPORTAL|IP_TAG_1|IP_DATA_1
