-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
46 lines (44 loc) · 1.41 KB
/
docker-compose.yml
File metadata and controls
46 lines (44 loc) · 1.41 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
# Docker Compose for DERP Server
#
# Usage:
# 1. Copy this file and create docker-compose.override.yml for your settings
# 2. Run: docker-compose up -d
#
# For production, ensure you have valid SSL certificates mounted.
services:
derper:
image: ghcr.io/slchris/derp-server:latest
container_name: derper
restart: unless-stopped
ports:
- "443:443" # HTTPS DERP
- "80:80" # HTTP (for Let's Encrypt or redirect)
- "3478:3478/udp" # STUN
environment:
- DERP_DOMAIN=example.com
- DERP_CERT_MODE=manual
- DERP_CERT_DIR=/app/certs
- DERP_ADDR=:443
- DERP_STUN=true
- DERP_HTTP_PORT=80
- DERP_VERIFY_CLIENTS=false
- TZ=UTC
volumes:
# Mount your SSL certificates
# Option 1: Let's Encrypt certificates
- /etc/letsencrypt/live/example.com/fullchain.pem:/app/certs/example.com.crt:ro
- /etc/letsencrypt/live/example.com/privkey.pem:/app/certs/example.com.key:ro
# Option 2: Custom certificates (uncomment and modify)
# - ./certs/server.crt:/app/certs/example.com.crt:ro
# - ./certs/server.key:/app/certs/example.com.key:ro
healthcheck:
test: ["CMD", "curl", "-sf", "http://localhost:80/"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"