services: panel: image: {{ pterodactyl_panel_image }} restart: unless-stopped env_file: .env {% if pterodactyl_routing_mode in ["host", "traefik_file"] %} ports: - "{{ nbops_traefik_file_bind_address if pterodactyl_routing_mode == 'traefik_file' else '0.0.0.0' }}:{{ pterodactyl_http_port }}:80" {% endif %} {% if pterodactyl_routing_mode == "traefik" %} # internal HTTP service port: 80; not published on the Docker host labels: - traefik.enable=true - traefik.http.routers.pterodactyl.rule=Host(`{{ pterodactyl_domain }}`) - traefik.http.routers.pterodactyl.entrypoints={{ pterodactyl_traefik_entrypoint }} - traefik.http.routers.pterodactyl.tls={{ pterodactyl_traefik_tls | bool | ternary('true', 'false') }} - traefik.http.services.pterodactyl.loadbalancer.server.port=80 networks: - default - {{ pterodactyl_traefik_network }} {% endif %} volumes: - ./var:/app/var - ./nginx:/etc/nginx/http.d - ./certs:/etc/letsencrypt - ./logs:/app/storage/logs depends_on: - database - cache database: image: {{ pterodactyl_db_image }} restart: unless-stopped environment: MYSQL_DATABASE: panel MYSQL_USER: pterodactyl MYSQL_PASSWORD: ${MYSQL_PASSWORD} MYSQL_ROOT_PASSWORD: ${MYSQL_PASSWORD} volumes: - ./database:/var/lib/mysql cache: image: {{ pterodactyl_cache_image }} restart: unless-stopped {% if pterodactyl_routing_mode == "traefik" %} networks: {{ pterodactyl_traefik_network }}: external: true {% endif %}