-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
117 lines (111 loc) · 3.13 KB
/
Copy pathdocker-compose.yml
File metadata and controls
117 lines (111 loc) · 3.13 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
services:
# gluetun:
# image: qmcgaw/gluetun:latest
# container_name: gluetun
# cap_add:
# - NET_ADMIN
# devices:
# - /dev/net/tun:/dev/net/tun
# environment:
# - VPN_SERVICE_PROVIDER=
# - VPN_TYPE=
# # OpenVPN
# - OPENVPN_USER=
# - OPENVPN_PASSWORD=
# # Wireguard
# - WIREGUARD_PRIVATE_KEY=
# - WIREGUARD_ADDRESS=
# - WIREGUARD_PUBLIC_KEY=
# - TZ=Asia/Kolkata
# - UPDATER_PERIOD=24h
# ports:
# - "8080:8080"
# - "8081:8081"
# restart: on-failure
app:
build: .
command: bash start.sh
restart: unless-stopped
volumes:
- ./config.py:/usr/src/app/config.py:ro
- ./accounts:/usr/src/app/accounts
- ./downloads:/usr/src/app/downloads
- tunnel_data:/data:ro
expose:
- "8080"
tunnel:
build:
context: .
dockerfile: tunnel.Dockerfile
restart: unless-stopped
network_mode: "service:app"
volumes:
- tunnel_data:/data
# --- Second instance example (uncomment to run) ---
# app2:
# build: .
# command: bash start.sh
# restart: unless-stopped
# volumes:
# - ./config2.py:/usr/src/app/config.py:ro
# - ./app2.accounts:/usr/src/app/accounts
# - ./app2.downloads:/usr/src/app/downloads
# - tunnel_data:/data:ro
# environment:
# - TUNNEL_URL_FILE=/data/tunnel2_url.txt
# expose:
# - "8080"
#
# tunnel2:
# build:
# context: .
# dockerfile: tunnel.Dockerfile
# restart: unless-stopped
# network_mode: "service:app2"
# environment:
# - TUNNEL_URL_FILE=/data/tunnel2_url.txt
# volumes:
# - tunnel_data:/data
#
# --- Optional: VPN for app2 via gluetun (uncomment and fill below) ---
# gluetun:
# image: qmcgaw/gluetun:latest
# container_name: gluetun
# cap_add:
# - NET_ADMIN
# devices:
# - /dev/net/tun:/dev/net/tun
# environment:
# - VPN_SERVICE_PROVIDER=
# - VPN_TYPE=
# # OpenVPN
# - OPENVPN_USER=
# - OPENVPN_PASSWORD=
# # Wireguard
# - WIREGUARD_PRIVATE_KEY=
# - WIREGUARD_ADDRESS=
# - WIREGUARD_PUBLIC_KEY=
# - TZ=Asia/Kolkata
# - UPDATER_PERIOD=24h
# ports:
# - "8080:8080"
# - "8081:8081"
# restart: on-failure
# Named tunnel (persistent URL with your own domain)
# 1. Go to https://dash.cloudflare.com/ → Networking → Tunnels → Create a tunnel
# 2. Choose "Cloudflared" connector type → name your tunnel → Save
# 3. Under "Connectors", copy the token from the install command (the eyJ... string)
# 4. Under "Public Hostname", add: subdomain.yourdomain.com → HTTP → localhost:8080
# 5. Paste the token below and uncomment the tunnel block for your app
# tunnel:
# image: cloudflare/cloudflared:latest
# restart: unless-stopped
# command: tunnel --no-autoupdate run --token <YOUR_TOKEN>
# network_mode: "service:app"
# tunnel2:
# image: cloudflare/cloudflared:latest
# restart: unless-stopped
# command: tunnel --no-autoupdate run --token <YOUR_TOKEN_2>
# network_mode: "service:app2"
volumes:
tunnel_data: