-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
103 lines (101 loc) · 2.34 KB
/
docker-compose.yml
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
---
version: "3.3"
services:
wireguard:
image: nativeplanet/anchor-wg:latest
container_name: wg
cap_add:
- NET_ADMIN
- SYS_MODULE
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/London
- SERVERURL=anchor.${ROOT_DOMAIN}
- SERVERPORT=51820
- PEERS=1
- PEERDNS=1.1.1.1
- INTERNAL_SUBNET=10.13.13.0
- ALLOWEDIPS=0.0.0.0/0
- LOG_CONFS=true
- HEADER_AUTH
volumes:
- ./wg/config:/config
- /lib/modules:/lib/modules
ports:
- 51820:51820/udp
sysctls:
- net.ipv4.conf.all.src_valid_mark=1
networks:
wgnet:
ipv4_address: 172.20.0.2
restart: unless-stopped
labels:
- "com.centurylinklabs.watchtower.enable=true"
caddy:
image: nativeplanet/anchor-caddy:latest
cap_add:
- NET_ADMIN
container_name: caddy
ports:
- 80:80
- 443:443
volumes:
- ./caddy/data:/data
- ./caddy/config:/config/caddy
networks:
wgnet:
ipv4_address: 172.20.0.4
restart: unless-stopped
labels:
- "com.centurylinklabs.watchtower.enable=true"
api:
image: nativeplanet/anchor-api:latest
depends_on:
- wireguard
- caddy
container_name: api
environment:
- HEADER_AUTH
- ROOT_DOMAIN
- REG_CODE
- DB_PATH=/api/db/anchors.db
- DEBUG_DB
volumes:
- ./wg/config:/etc/wireguard/
- ./db:/api/db
networks:
wgnet:
ipv4_address: 172.20.0.3
restart: unless-stopped
labels:
- "com.centurylinklabs.watchtower.enable=true"
watchtower:
image: containrrr/watchtower
restart: always
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /etc/timezone:/etc/timezone:ro
environment:
- WATCHTOWER_CLEANUP=true
- WATCHTOWER_LABEL_ENABLE=true
- WATCHTOWER_INCLUDE_RESTARTING=true
labels:
- "com.centurylinklabs.watchtower.enable=true"
# dbweb:
# image: coleifer/sqlite-web@sha256:b0d4094b883ee274d2242d8e5b4173f40e56a1d137660cf78d67c87164db9490
# container_name: dbweb
# environment:
# - SQLITE_DATABASE=anchors.db
# volumes:
# - ./db:/data
# depends_on:
# - api
networks:
wgnet:
driver: bridge
ipam:
driver: default
config:
- subnet: 172.20.0.0/24
gateway: 172.20.0.1