feat(deploy): add optional tor service to dev compose for native-backend dev
Mirrors the prod tor service but with 127.0.0.1-only host port bindings so a `cargo run` on the host can reach 127.0.0.1:9050 / 9051. Default password baked in (overridable via TOR_CONTROL_PASSWORD env) since host-loopback is the only exposure surface — same friction-free posture as the postgres entry in this file. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -17,5 +17,28 @@ services:
|
|||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 10
|
retries: 10
|
||||||
|
|
||||||
|
# Optional: TOR daemon for crawler dev. Ports bind to 127.0.0.1 only
|
||||||
|
# — never the LAN — so a native `cargo run` on the host can reach
|
||||||
|
# 127.0.0.1:9050 / 9051. Mirrors the prod tor service (see
|
||||||
|
# docker-compose.yml), just with host-loopback ports and a default
|
||||||
|
# password baked in for friction-free dev.
|
||||||
|
tor:
|
||||||
|
image: dockurr/tor:latest
|
||||||
|
entrypoint: ["/bin/sh", "/usr/local/bin/mangalord-entrypoint.sh"]
|
||||||
|
environment:
|
||||||
|
PASSWORD: ${TOR_CONTROL_PASSWORD:-dev-tor-password}
|
||||||
|
volumes:
|
||||||
|
- ./tor/torrc:/etc/tor/torrc:ro
|
||||||
|
- ./tor/entrypoint.sh:/usr/local/bin/mangalord-entrypoint.sh:ro
|
||||||
|
ports:
|
||||||
|
- "127.0.0.1:9050:9050"
|
||||||
|
- "127.0.0.1:9051:9051"
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "nc -z 127.0.0.1 9050 && nc -z 127.0.0.1 9051"]
|
||||||
|
interval: 5s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 20
|
||||||
|
start_period: 30s
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
mangalord-postgres-dev:
|
mangalord-postgres-dev:
|
||||||
|
|||||||
Reference in New Issue
Block a user