diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 14e31d0..069c586 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -17,5 +17,28 @@ services: timeout: 5s 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: mangalord-postgres-dev: