tor-container/docker-compose.yml

40 lines
1 KiB
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-new:/var/lib/tor/:Z
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-new:/var/lib/tor/:Z
volumes:
tor-data-new: