-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
236 lines (236 loc) · 7.52 KB
/
docker-compose.yaml
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
networks:
backend:
ipam:
config:
- subnet: 172.52.0.0/16
secrets:
WEBPASSWORD:
file: '/etc/stargate/docker/.secrets/WEBPASSWORD'
services:
cloudflared:
command: "tunnel --no-autoupdate run --token ${CLOUDFLARED_TOKEN}"
container_name: cloudflared
env_file: .env
image: cloudflare/cloudflared:latest
restart: unless-stopped
dhcphelper:
cap_add:
- NET_ADMIN
container_name: dhcphelper
environment:
IP: '172.52.0.10'
image: homeall/dhcphelper:latest
network_mode: host
restart: unless-stopped
ddns:
container_name: ddns
env_file: .env
environment:
API_KEY: "${CF_TOKEN}"
ZONE: "${CF_ZONE}"
SUBDOMAIN: "*"
PROXIED: "true"
image: oznu/cloudflare-ddns:latest
network_mode: host
restart: unless-stopped
docker-socket-proxy:
container_name: proxy
environment:
- CONTAINERS=1
- POST=0
- SERVICES=1
- TASKS=1
image: ghcr.io/tecnativa/docker-socket-proxy
ports:
- 0.0.0.0:2375:2375
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
node-exporter:
command: --path.rootfs=/host
container_name: node-exporter
image: quay.io/prometheus/node-exporter
ports:
- 9100:9100
restart: unless-stopped
volumes:
- /:/host:ro,rslave
pihole:
cap_add:
- NET_ADMIN
container_name: pihole
depends_on:
- dhcphelper
- traefik
dns:
- 1.1.1.1
- 8.8.8.8
env_file: .env
environment:
WEBPASSWORD_FILE: "/run/secrets/WEBPASSWORD"
hostname: pihole
image: pihole/pihole:latest
labels:
- homepage.group=Stargate
- homepage.name=PiHole
- homepage.icon=pi-hole
- homepage.href=https://stargate.${DOMAIN}/admin
- homepage.description=DNS Ad-Blocking and DHCP server
- homepage.widget.type=pihole
- homepage.widget.url=http://stargate:81
- homepage.widget.key=${PIHOLE_API_KEY}
- traefik.enable=true
- traefik.http.routers.pihole.entrypoints=websecure
- traefik.http.routers.pihole.rule=host(`stargate.${DOMAIN}`)
- traefik.http.routers.pihole.tls=true
- traefik.http.services.pihole.loadbalancer.server.port=80
- traefik.http.services.pihole.loadbalancer.server.url=http://127.0.0.1:81
networks:
default: {}
backend:
ipv4_address: "172.52.0.10"
ports:
- 53:53/tcp
- 53:53/udp
- 81:80
restart: unless-stopped
secrets:
- WEBPASSWORD
volumes:
- /etc/stargate/docker/dnsmasq.d:/etc/dnsmasq.d
- /etc/stargate/docker/pihole:/etc/pihole
portainer:
command: -H unix:///var/run/docker.sock --admin-password "${ADMIN_PASSWORD_HASH}"
container_name: portainer
depends_on:
- traefik
env_file: .env
image: portainer/portainer-ce
labels:
- homepage.group=Stargate
- homepage.name=Portainer
- homepage.icon=portainer
- homepage.href=https://portainer.stargate.${DOMAIN}
- homepage.description=Container management
- homepage.widget.type=portainer
- homepage.widget.env=1
- homepage.widget.url=http://stargate:9000
- homepage.widget.key=${PORTAINER_API_KEY}
- homepage.widget.fields=["running", "stopped", "total"]
- traefik.enable=true
- traefik.http.routers.portainer.entrypoints=websecure
- traefik.http.routers.portainer.rule=Host(`portainer.stargate.${DOMAIN}`)
- traefik.http.routers.portainer.tls=true
- traefik.http.services.portainer.loadbalancer.server.port=9000
ports:
- 9000:9000
volumes:
- /etc/stargate/docker/portainer:/data
- /var/run/docker.sock:/var/run/docker.sock
tailscale:
cap_add:
- NET_ADMIN
- SYS_MODULE
container_name: tailscale
env_file: .env
environment:
TS_EXTRA_ARGS: '--advertise-exit-node'
TS_HOSTNAME: stargate
TS_ROUTES: 192.168.31.0/24
TS_STATE_DIR: /var/lib/tailscale
TS_USERSPACE: false
image: tailscale/tailscale:latest
network_mode: host
restart: unless-stopped
volumes:
- /dev/net/tun:/dev/net/tun
- /etc/stargate/docker/tailscale:/var/lib/tailscale
traefik:
command:
- --api.dashboard=true
- --api.insecure=true
- --certificatesresolvers.letsencrypt.acme.dnschallenge.provider=cloudflare
- --certificatesresolvers.letsencrypt.acme.dnschallenge.resolvers=1.1.1.1:53
- --certificatesresolvers.letsencrypt.acme.dnschallenge=true
- --certificatesresolvers.letsencrypt.acme.storage=/etc/traefik/acme.json
- --entrypoints.web.address=:80
- --entrypoints.web.http.redirections.entryPoint.scheme=https
- --entrypoints.web.http.redirections.entryPoint.to=websecure
- --entrypoints.websecure.address=:443
- --entrypoints.websecure.http.tls.certResolver=letsencrypt
- --entrypoints.websecure.http.tls.domains[0].main=${DOMAIN}
- --entrypoints.websecure.http.tls.domains[0].sans=*.stargate.${DOMAIN},*.${DOMAIN}
- --entrypoints.websecure.http.tls=true
- --log.level=DEBUG
- --providers.docker.exposedbydefault=true
- --providers.docker=true
- --serverstransport.insecureskipverify=true
container_name: traefik
env_file: .env
environment:
CLOUDFLARE_DNS_API_TOKEN: "${CF_TOKEN}"
CLOUDFLARE_EMAIL: "${CF_EMAIL}"
TRAEFIK_CERTIFICATESRESOLVERS_LETSENCRYPT_ACME_EMAIL: "${CF_EMAIL}"
extra_hosts:
- host.docker.internal:172.17.0.1
image: traefik
labels:
- homepage.group=Stargate
- homepage.name=Traefik
- homepage.icon=traefik
- homepage.href=https://traefik.stargate.${DOMAIN}
- homepage.description=Reverse proxy for exposing apps via HTTPS
- homepage.widget.type=traefik
- homepage.widget.url=http://stargate:8080
- traefik.enable=true
- traefik.http.routers.dashboard.entrypoints=websecure
- traefik.http.routers.dashboard.rule=Host(`traefik.stargate.${DOMAIN}`)
- traefik.http.routers.dashboard.service=api@internal
- traefik.http.routers.dashboard.tls=true
networks:
default: {}
backend: {}
ports:
- 80:80
- 8080:8080
- 443:443
restart: unless-stopped
volumes:
- /etc/stargate/docker/letsencrypt/acme.json:/etc/traefik/acme.json
- /var/run/docker.sock:/var/run/docker.sock
uptime-kuma:
container_name: uptime-kuma
depends_on:
- traefik
hostname: uptime-kuma
image: louislam/uptime-kuma:1
labels:
- homepage.group=Stargate
- homepage.name=Uptime Kuma
- homepage.icon=uptime-kuma
- homepage.href=https://status.${DOMAIN}
- homepage.description=Component Health Tracking and Alerting
- homepage.widget.type=uptimekuma
- homepage.widget.url=http://stargate:3001
- homepage.widget.slug=technis
- traefik.enable=true
- traefik.http.routers.uptime-kuma.entrypoints=websecure
- traefik.http.routers.uptime-kuma.rule=Host(`status.stargate.${DOMAIN}`)
- traefik.http.routers.uptime-kuma.tls=true
- traefik.http.services.uptime-kuma.loadbalancer.server.port=3001
ports:
- 3001:3001
restart: unless-stopped
volumes:
- /etc/stargate/docker/uptime-kuma:/app/data
watchtower:
container_name: watchtower
env_file: .env
environment:
WATCHTOWER_SCHEDULE: "0 0 1 * * *"
WATCHTOWER_CLEANUP: "true"
WATCHTOWER_DEBUG: "true"
image: containrrr/watchtower
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock