forked from AmiRCandy/CandyConnect
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
80 lines (76 loc) · 2.56 KB
/
docker-compose.yml
File metadata and controls
80 lines (76 loc) · 2.56 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
79
80
# ═══════════════════════════════════════════════════════════
# CandyConnect - Docker Compose
# Works on Linux, macOS, and Windows (Docker Desktop)
# ═══════════════════════════════════════════════════════════
services:
# ── Redis Database ──
redis:
image: redis:7-alpine
container_name: candyconnect-redis
restart: unless-stopped
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
start_period: 5s
networks:
- candyconnect-net
# ── CandyConnect Server ──
candyconnect:
build:
context: .
dockerfile: Dockerfile
container_name: candyconnect-server
restart: unless-stopped
depends_on:
redis:
condition: service_healthy
ports:
- "${CC_PANEL_PORT:-8443}:${CC_PANEL_PORT:-8443}"
# VPN protocol ports - uncomment only the ones you need.
# WARNING: Ports 443 and 53 often conflict with host services.
# Only enable them if you are sure nothing else uses them.
# - "443:443" # V2Ray / Xray (conflicts with web servers)
- "51820:51820/udp" # WireGuard
- "1194:1194/udp" # OpenVPN
- "500:500/udp" # IKEv2
- "4500:4500/udp" # IKEv2 NAT-T
- "1701:1701/udp" # L2TP
# - "53:53/udp" # DNSTT (conflicts with systemd-resolved)
# - "8388:8388" # SlipStream
# - "9443:9443" # TrustTunnel
environment:
- CC_DATA_DIR=/opt/candyconnect
- CC_REDIS_URL=redis://redis:6379/0
- CC_JWT_SECRET=${CC_JWT_SECRET:-}
- CC_PANEL_PORT=${CC_PANEL_PORT:-8443}
- CC_PANEL_PATH=${CC_PANEL_PATH:-/candyconnect}
- CC_ADMIN_USER=${CC_ADMIN_USER:-admin}
- CC_ADMIN_PASS=${CC_ADMIN_PASS:-admin123}
volumes:
- candyconnect_data:/opt/candyconnect/cores
- candyconnect_backups:/opt/candyconnect/backups
- candyconnect_logs:/opt/candyconnect/logs
# Required for VPN protocol management (iptables, network config)
cap_add:
- NET_ADMIN
- SYS_MODULE
sysctls:
- net.ipv4.ip_forward=1
networks:
- candyconnect-net
volumes:
redis_data:
driver: local
candyconnect_data:
driver: local
candyconnect_backups:
driver: local
candyconnect_logs:
driver: local
networks:
candyconnect-net:
driver: bridge