tor-container/docker-compose.yml
2026-02-06 22:06:44 -05:00

40 lines
1,014 B
YAML

services:
# Tor Service - Runs Tor with Strict Validation
tor:
build: .
image: docker-tor-hidden-service:latest
container_name: tor-service
restart: unless-stopped
environment:
# Format: ExternalPort:ContainerName:InternalPort
- HIDDEN_SERVICE_HOSTS=80:web:80
- TOR_CONTROL_PASSWORD=secure_password
ports:
- "9051:9051"
- "9050:9050"
volumes:
- tor-data:/var/lib/tor/
depends_on:
- web
# Demo Web Service
web:
image: nginx:alpine
container_name: my-website
restart: unless-stopped
# Vanguards Service - Sidecar
vanguards:
build: .
image: docker-tor-hidden-service:latest
container_name: vanguards-sidecar
restart: unless-stopped
# The 'vanguards' first word triggers the logic in your entrypoint.sh
command: vanguards --control_ip tor-service --control_port 9051 --control_pass secure_password
depends_on:
- tor
volumes:
- tor-data:/var/lib/tor/
volumes:
tor-data: