Repository navigation
Expand file tree
/
Copy pathcompose.dev.yaml
More file actions
78 lines (63 loc) · 2.35 KB
/
Copy pathcompose.dev.yaml
File metadata and controls
78 lines (63 loc) · 2.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# Docker Compose for Labelgate
#
# Usage:
# 1. Copy .env.example to .env and configure credentials
# 2. Run: docker-compose up -d
#
# For multi-host deployment with agents, see the Multi-Host page of the documentation.
services:
# Main Labelgate instance
labelgate:
build:
context: .
dockerfile: docker/Dockerfile
image: labelgate:latest
container_name: labelgate
restart: unless-stopped
# Run as root to access Docker socket
# Alternatively, add the labelgate user to the docker group
user: root
volumes:
# Docker socket for container monitoring
- /var/run/docker.sock:/var/run/docker.sock:ro
# Persistent storage
- labelgate-data:/app/config
# Optional: custom config file
# - ./labelgate.yaml:/etc/labelgate/labelgate.yaml:ro
environment:
# Cloudflare credentials (required)
- LABELGATE_CLOUDFLARE_API_TOKEN=${LABELGATE_CLOUDFLARE_API_TOKEN}
- LABELGATE_CLOUDFLARE_ACCOUNT_ID=${LABELGATE_CLOUDFLARE_ACCOUNT_ID}
- LABELGATE_CLOUDFLARE_TUNNEL_ID=${LABELGATE_CLOUDFLARE_TUNNEL_ID}
# API and dashboard bearer token (>= 16 chars; generate: openssl rand -hex 32).
# Required for the API and dashboard; if empty, both are disabled.
- LABELGATE_API_TOKEN=${LABELGATE_API_TOKEN}
# Optional settings
- LABELGATE_LOG_LEVEL=${LABELGATE_LOG_LEVEL:-info}
- LABELGATE_LOG_FORMAT=${LABELGATE_LOG_FORMAT:-text}
# Database path (inside container)
- LABELGATE_DB_PATH=/app/config/labelgate.db
ports:
# HTTP API and dashboard (authenticated with LABELGATE_API_TOKEN).
# Bound to localhost on purpose: put TLS, a VPN or Cloudflare Access in front before exposing it.
- "127.0.0.1:28111:28111"
# Agent server (needs agent.enabled; agents connect to wss://<host>:28112/ws)
# - "28112:28112"
healthcheck:
test: ["CMD", "/app/labelgate", "healthcheck"]
interval: 30s
timeout: 3s
retries: 3
start_period: 10s
# labels:
# # Self-monitoring example (optional)
# labelgate.dns.api.hostname: api.example.com
# labelgate.dns.api.type: A
# labelgate.dns.api.target: auto
# labelgate.dns.api.proxied: "true"
volumes:
labelgate-data:
driver: local
networks:
default:
name: labelgate-network