-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathcompose.traefik.yml
More file actions
67 lines (65 loc) · 2.71 KB
/
compose.traefik.yml
File metadata and controls
67 lines (65 loc) · 2.71 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
# Example: Any-Sync-Bundle with Traefik Proxy
#
# This configuration sets up Traefik to proxy TCP and UDP traffic to any-sync-bundle.
#
# Usage:
# 1. Edit ANY_SYNC_BUNDLE_INIT_EXTERNAL_ADDRS below (replace with your server's IP/hostname)
# 2. Run: docker compose -f compose.traefik.yml up -d
# 3. Get client config: cat ./data/client-config.yml
#
# Debugging:
# - View Traefik dashboard: http://localhost:8080
# - Test TCP port: nc -zv <your-ip> 33010
services:
traefik:
image: docker.io/traefik:v3.5.3
container_name: traefik
restart: unless-stopped
command:
# Enable Docker provider
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
# Define EntryPoints for any-sync TCP and UDP
- "--entrypoints.any-sync-tcp.address=:33010"
- "--entrypoints.any-sync-udp.address=:33020/udp"
# Optional: Enable Traefik dashboard for debugging
# - "--api.dashboard=true"
# - "--api.insecure=true"
# - "--entrypoints.traefik.address=:8080"
# - "--accesslog=true"
# - "--log.level=DEBUG"
ports:
- "33010:33010" # TCP for DRPC protocol any-sync-bundle
- "33020:33020/udp" # UDP for QUIC protocol any-sync-bundle
# Optional: Enable Traefik dashboard for debugging
# - "8080:8080"
volumes:
# Required: Docker socket for service discovery
- /var/run/docker.sock:/var/run/docker.sock:ro
any-sync-bundle:
image: ghcr.io/grishy/any-sync-bundle:1.4.3-2026-04-21
container_name: any-sync-bundle-aio
restart: unless-stopped
environment:
# IMPORTANT: Replace this with your server's public IP or hostname
# This is the address clients will use to connect (Traefik's public address)
# Read the documentation for more details.
ANY_SYNC_BUNDLE_INIT_EXTERNAL_ADDRS: "192.168.100.9"
volumes:
- ./data:/data
labels:
# Enable Traefik for this service
- "traefik.enable=true"
# TCP Router Configuration
# Routes all TCP traffic on port 33010 to any-sync-bundle
- "traefik.tcp.routers.any-sync-tcp.rule=HostSNI(`*`)"
- "traefik.tcp.routers.any-sync-tcp.entrypoints=any-sync-tcp"
- "traefik.tcp.routers.any-sync-tcp.service=any-sync-tcp-service"
- "traefik.tcp.routers.any-sync-tcp.tls.passthrough=true"
# Try TLS passthrough
- "traefik.tcp.services.any-sync-tcp-service.loadbalancer.server.port=33010"
# UDP Router Configuration
# Routes all UDP traffic on port 33020 to any-sync-bundle
- "traefik.udp.routers.any-sync-udp.entrypoints=any-sync-udp"
- "traefik.udp.routers.any-sync-udp.service=any-sync-udp-service"
- "traefik.udp.services.any-sync-udp-service.loadbalancer.server.port=33020"