Enable network_mode: host to fix connectivity issues
This commit is contained in:
parent
017b76f136
commit
a369dd48a4
1 changed files with 12 additions and 5 deletions
|
|
@ -4,14 +4,18 @@ services:
|
||||||
build: .
|
build: .
|
||||||
image: docker-tor-hidden-service:latest
|
image: docker-tor-hidden-service:latest
|
||||||
container_name: tor-service
|
container_name: tor-service
|
||||||
|
user: "0:0"
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
network_mode: host
|
||||||
environment:
|
environment:
|
||||||
# Format: ExternalPort:ContainerName:InternalPort
|
# Format: ExternalPort:ContainerName:InternalPort
|
||||||
- HIDDEN_SERVICE_HOSTS=80:web:80
|
# Since we are on host network, 'web' hostname won't resolve via Docker DNS.
|
||||||
|
# We must point to localhost if nginx is also on host network.
|
||||||
|
- HIDDEN_SERVICE_HOSTS=80:localhost:80
|
||||||
- TOR_CONTROL_PASSWORD=secure_password
|
- TOR_CONTROL_PASSWORD=secure_password
|
||||||
ports:
|
# ports: <-- Not needed in host mode
|
||||||
- "9051:9051"
|
# - "9051:9051"
|
||||||
- "9050:9050"
|
# - "9050:9050"
|
||||||
volumes:
|
volumes:
|
||||||
- ./tor-data:/var/lib/tor/:z
|
- ./tor-data:/var/lib/tor/:z
|
||||||
depends_on:
|
depends_on:
|
||||||
|
|
@ -22,6 +26,7 @@ services:
|
||||||
image: nginx:alpine
|
image: nginx:alpine
|
||||||
container_name: my-website
|
container_name: my-website
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
network_mode: host
|
||||||
|
|
||||||
# Vanguards Service - Sidecar
|
# Vanguards Service - Sidecar
|
||||||
vanguards:
|
vanguards:
|
||||||
|
|
@ -30,8 +35,10 @@ services:
|
||||||
container_name: vanguards-sidecar
|
container_name: vanguards-sidecar
|
||||||
user: "0:0"
|
user: "0:0"
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
network_mode: host
|
||||||
# The 'vanguards' first word triggers the logic in your entrypoint.sh
|
# The 'vanguards' first word triggers the logic in your entrypoint.sh
|
||||||
command: vanguards --control_ip tor-service --control_port 9051 --control_pass secure_password
|
# Connect to localhost since we share the network stack
|
||||||
|
command: vanguards --control_ip localhost --control_port 9051 --control_pass secure_password
|
||||||
depends_on:
|
depends_on:
|
||||||
- tor
|
- tor
|
||||||
volumes:
|
volumes:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue