-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
113 lines (103 loc) · 2.95 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
104
105
106
107
108
109
110
111
112
113
version: "3"
name: dothq-org
services:
scalar:
container_name: scalar
hostname: scalar
restart: always
networks:
- intranet
environment:
- HOST=0.0.0.0
- PORT=80
- SCALAR_ALLOWED_HOSTS=dothq.org,dothq.co,dothqaaaxerjhwh6ovuvvgypv5khivfxpd7zpdvcr3ssemrjdhcvniyd.onion
build:
context: .
dockerfile: docker/www.dockerfile
onion:
container_name: onion
image: goldy/tor-hidden-service:latest
restart: always
links:
- nginx
networks:
- intranet
volumes:
- tor-keys:/var/lib/tor/hidden_service/
environment:
TOR_ENABLE_VANGUARDS: "true"
WWW_TOR_SERVICE_HOSTS: "80:nginx:80"
WWW_TOR_SERVICE_VERSION: "3"
secrets:
- www
nginx:
build:
context: .
dockerfile: docker/nginx.dockerfile
args:
ENABLED_MODULES: brotli
container_name: nginx
hostname: nginx
restart: always
volumes:
- ./docker/config/nginx.conf:/etc/nginx/nginx.conf:ro
- ./docker/config/compression.conf:/etc/nginx/compression.conf:ro
- ./docker/config/ssl.conf:/etc/nginx/ssl.conf:ro
- ./docker/config/sites:/etc/nginx/sites:ro
- le-certs:/etc/letsencrypt
- le-www:/var/www/letsencrypt
links:
- scalar
- certbot
networks:
- intranet
- internet # Exposed
depends_on:
- certbot
ports:
- 80:80
- 443:443
certbot:
image: certbot/certbot
container_name: certbot
restart: always
volumes:
- le-certs:/etc/letsencrypt
- le-www:/var/www/letsencrypt
networks:
- intranet
entrypoint: '/bin/sh -c ''trap exit TERM; while :; do echo "Certbot has started, waiting an hour to renew in case of repeated restart."; sleep 1h; certbot renew; sleep 12h & wait $${!}; done;'''
watchtower:
image: containrrr/watchtower
restart: always
environment:
- WATCHTOWER_CLEANUP=true
- WATCHTOWER_POLL_INTERVAL=60
volumes:
- /var/run/docker.sock:/var/run/docker.sock
reboot:
image: docker:cli
volumes: ["/var/run/docker.sock:/var/run/docker.sock"]
command:
[
"/bin/sh",
"-c",
"while true; do sleep 86400; docker compose -p dothq-org restart; done"
]
restart: unless-stopped
networks:
intranet:
driver: bridge
internet:
enable_ipv6: true
ipam:
config:
- subnet: 2001:db8:1::/64
volumes:
le-certs:
le-www:
tor-keys:
driver: local
secrets:
www:
file: ./hs_ed25519_secret_key