services:
  laya-server:
    image: 1panel/laya-server:v0.1.2
    container_name: "${CONTAINER_NAME}"
    restart: always
    networks:
      - 1panel-network
    ports:
      - "${PANEL_APP_PORT_HTTP}:8080"
    environment:
      LAYA_ADMIN_USERNAME: "${LAYA_ADMIN_USERNAME}"
      LAYA_ADMIN_PASSWORD: "${LAYA_ADMIN_PASSWORD}"
    volumes:
      - ./data:/data
    healthcheck:
      test:
        - CMD-SHELL
        - "python -c \"import urllib.request; urllib.request.urlopen('http://127.0.0.1:8080/health/live', timeout=3)\" || exit 1"
      interval: 30s
      timeout: 5s
      start_period: 20s
      retries: 3
    labels:
      createdBy: Apps
networks:
  1panel-network:
    external: true
