castor-tor/docker-compose.yml

50 lines
891 B
YAML

version: "3.6"
services:
tor:
build:
context: ./tor
dockerfile: Dockerfile
networks:
- net_tor
expose:
- 9050
- 9080
scale: 5
haproxy:
image: haproxy:alpine
restart: always
depends_on:
tor:
condition: service_started
haproxy-conf-generator:
condition: service_completed_successfully
ports:
- ${PROXY_PORT}:8080
volumes:
- haproxy_conf:/usr/local/etc/haproxy
networks:
- net_tor
env_file: ./.env
haproxy-conf-generator:
build: ./conf-generator
command: python gen_conf.py
depends_on:
tor:
condition: service_started
volumes:
- haproxy_conf:/usr/local/etc/haproxy
- /var/run/docker.sock:/tmp/docker.sock
networks:
- net_tor
env_file: ./.env
volumes:
haproxy_conf:
networks:
net_tor:
name: net_tor