-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
43 lines (40 loc) · 1.12 KB
/
docker-compose.yml
File metadata and controls
43 lines (40 loc) · 1.12 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
services:
onion-proxy:
image: nginx:alpine
volumes:
- ./conf.d:/etc/nginx/conf.d:ro
extra_hosts:
- "host.docker.internal:host-gateway"
restart: unless-stopped
# If your origin is a container, add both services to the same network:
# networks:
# - my-app-network
tor:
build:
context: .
dockerfile: Dockerfile.tor
user: root
entrypoint: ["/bin/sh", "-c"]
command:
- |
# Fix ownership on the hidden service volume and any existing subdirs
chown tor:tor /var/lib/tor/hidden_service
chmod 700 /var/lib/tor/hidden_service
for dir in /var/lib/tor/hidden_service/*/; do
[ -d "$$dir" ] || continue
chown -R tor:tor "$$dir"
chmod 700 "$$dir"
done
exec su -s /bin/sh tor -c "tor -f /etc/tor/torrc"
volumes:
- ./torrc:/etc/tor/torrc:ro
- tor-keys:/var/lib/tor/hidden_service
depends_on:
- onion-proxy
restart: unless-stopped
volumes:
tor-keys:
# To connect to a container-based origin, define an external network:
# networks:
# my-app-network:
# external: true