-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
81 lines (77 loc) · 1.84 KB
/
docker-compose.yml
File metadata and controls
81 lines (77 loc) · 1.84 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
81
version: '3.8'
services:
# Relay server - accepts incoming tunnel connections
relay:
build:
context: .
dockerfile: Dockerfile
image: localup:latest
container_name: localup-relay
ports:
- "4443:4443/udp" # QUIC control plane (UDP)
- "18080:18080" # HTTP server
- "18443:18443" # HTTPS server
volumes:
- ./relay-cert.pem:/app/relay-cert.pem:ro
- ./relay-key.pem:/app/relay-key.pem:ro
environment:
RUST_LOG: info
LOCALUP_JWT_SECRET: "my-super-secret-key"
networks:
- localup-net
entrypoint: ["localup"]
command:
- "relay"
- "--localup-addr"
- "0.0.0.0:4443"
- "--http-addr"
- "0.0.0.0:18080"
- "--https-addr"
- "0.0.0.0:18443"
- "--tls-cert"
- "/app/relay-cert.pem"
- "--tls-key"
- "/app/relay-key.pem"
- "--jwt-secret"
- "my-super-secret-key"
healthcheck:
test: ["CMD", "localup", "--help"]
interval: 30s
timeout: 10s
retries: 3
# Example: Web server to expose via tunnel (internal only, no host port exposed)
web:
image: python:3.11-slim
container_name: localup-web
networks:
- localup-net
command: python3 -m http.server 127.0.0.1 3000
# Example: Agent that creates a tunnel to the web server
agent:
build:
context: .
dockerfile: Dockerfile
image: localup:latest
container_name: localup-agent
networks:
- localup-net
depends_on:
relay:
condition: service_healthy
environment:
RUST_LOG: info
entrypoint: ["localup"]
command:
- "--address"
- "web:3000"
- "--relay"
- "relay:4443"
- "--protocol"
- "http"
- "--subdomain"
- "myapp"
- "--token"
- "my-super-secret-key"
networks:
localup-net:
driver: bridge