services:
  nps:
    image: duan2001/nps:v0.30.5
    container_name: ${CONTAINER_NAME}
    ports:
      - ${PANEL_APP_PORT_HTTP}:${PANEL_APP_PORT_HTTP}
      - ${NPS_BRIDGE_PORT}:${NPS_BRIDGE_PORT}
      - ${NPS_BRIDGE_TLS_PORT}:${NPS_BRIDGE_TLS_PORT}
      - ${NPS_BRIDGE_WS_PORT}:${NPS_BRIDGE_WS_PORT}
      - ${NPS_BRIDGE_WSS_PORT}:${NPS_BRIDGE_WSS_PORT}
      - ${NPS_HTTP_PROXY_PORT}:${NPS_HTTP_PROXY_PORT}
      - ${NPS_HTTPS_PROXY_PORT}:${NPS_HTTPS_PROXY_PORT}
      - ${NPS_RANDOM_PORT_START}-${NPS_RANDOM_PORT_END}:${NPS_RANDOM_PORT_START}-${NPS_RANDOM_PORT_END}
    restart: always
    volumes:
      - ./conf:/conf
      - ./web:/web
      - /etc/localtime:/etc/localtime:ro
    environment:
      NPS_WEB_HOST: ${NPS_WEB_HOST}
      NPS_WEB_PORT: ${PANEL_APP_PORT_HTTP}
      NPS_WEB_USERNAME: ${NPS_WEB_USERNAME}
      NPS_WEB_PASSWORD: ${NPS_WEB_PASSWORD}
      NPS_WEB_OPEN_SSL: ${NPS_WEB_OPEN_SSL}
      NPS_PUBLIC_VKEY: ${NPS_PUBLIC_VKEY}
      NPS_BRIDGE_PORT: ${NPS_BRIDGE_PORT}
      NPS_AUTH_CRYPT_KEY: ${NPS_AUTH_CRYPT_KEY}
      NPS_HTTP_PROXY_IP: ${NPS_HTTP_PROXY_IP}
      NPS_HTTP_PROXY_PORT: ${NPS_HTTP_PROXY_PORT}
      NPS_HTTPS_PROXY_PORT: ${NPS_HTTPS_PROXY_PORT}
    network_mode: 1panel-network
    labels:
      createdBy: "Apps"

networks:
  1panel-network:
    external: true