bittorrent-benchmarks/docker-compose-deluge.local.yaml

134 lines
3.8 KiB
YAML

# This compose spec contains the basic setup for running integration tests with the
# test runner outside of a container. This is ideal for local development.
services:
clean-volumes:
image: alpine
container_name: clean-volumes
entrypoint:
- /bin/sh
- -c
- |
rm -rf /var/lib/deluge1/* /var/lib/deluge2/* /var/lib/deluge3/*
touch /.done
sleep infinity
volumes:
- deluge-volume-1:/var/lib/deluge1
- deluge-volume-2:/var/lib/deluge2
- deluge-volume-3:/var/lib/deluge3
healthcheck:
timeout: 10s
test: [ "CMD", "test", "-f", "/.done" ]
retries: 10
interval: 1s
deluge-1:
image: ${COMPOSE_DELUGE_IMAGE:-codexstorage/deluge}
container_name: deluge-1
environment:
- DELUGE_RPC_PORT=6890
- DELUGE_LISTEN_PORTS=6891,6892
- DELUGE_LOG_LEVEL=${DELUGE_LOG_LEVEL:-info}
- DELUGE_NODE_ID=deluge-1
volumes:
- deluge-volume-1:/var/lib/deluge
ports:
- "6890:6890"
- "6891-6892:6891-6892"
depends_on:
clean-volumes:
condition: service_healthy
deluge-agent-1:
image: bittorrent-benchmarks:test
container_name: agent-1
entrypoint: [ "poetry", "run", "bittorrent-benchmarks",
"agent", "config/deluge/agent.local.yaml", "deluge_agent", "--port", "9001" ]
environment:
- TORRENTS_ROOT=/var/lib/deluge/downloads
volumes:
- deluge-volume-1:/var/lib/deluge
ports:
- "9001:9001"
deluge-2:
image: ${COMPOSE_DELUGE_IMAGE:-codexstorage/deluge}
container_name: deluge-2
environment:
- DELUGE_RPC_PORT=6893
- DELUGE_LISTEN_PORTS=6894,6895
- DELUGE_LOG_LEVEL=${DELUGE_LOG_LEVEL:-info}
- DELUGE_NODE_ID=deluge-2
volumes:
- deluge-volume-2:/var/lib/deluge
ports:
- "6893:6893"
- "6894-6895:6894-6895"
depends_on:
clean-volumes:
condition: service_healthy
deluge-agent-2:
image: bittorrent-benchmarks:test
container_name: agent-2
entrypoint: [ "poetry", "run", "bittorrent-benchmarks", "agent",
"config/deluge/agent.local.yaml", "deluge_agent", "--port", "9002" ]
environment:
- TORRENTS_ROOT=/var/lib/deluge/downloads
volumes:
- deluge-volume-2:/var/lib/deluge
ports:
- "9002:9002"
deluge-3:
image: ${COMPOSE_DELUGE_IMAGE:-codexstorage/deluge}
container_name: deluge-3
environment:
- DELUGE_RPC_PORT=6896
- DELUGE_LISTEN_PORTS=6897,6898
- DELUGE_LOG_LEVEL=${DELUGE_LOG_LEVEL:-info}
- DELUGE_NODE_ID=deluge-3
volumes:
- deluge-volume-3:/var/lib/deluge
ports:
- "6896:6896"
- "6897-6898:6897-6898"
depends_on:
clean-volumes:
condition: service_healthy
deluge-agent-3:
image: bittorrent-benchmarks:test
container_name: agent-3
entrypoint: [ "poetry", "run", "bittorrent-benchmarks", "agent", "config/deluge/agent.local.yaml",
"deluge_agent", "--port", "9003" ]
environment:
- TORRENTS_ROOT=/var/lib/deluge/downloads
volumes:
- deluge-volume-3:/var/lib/deluge
ports:
- "9003:9003"
tracker:
image: ${COMPOSE_TRACKER_IMAGE:-codexstorage/bittorrent-tracker}
container_name: tracker
ports:
- "8000:8000"
elasticsearch:
image: ${COMPOSE_ES_IMAGE:-docker.elastic.co/elasticsearch/elasticsearch:8.17.1}
container_name: elasticsearch
command: ["elasticsearch", "-Elogger.level=ERROR"]
environment:
- discovery.type=single-node
- xpack.security.http.ssl.enabled=false
- xpack.security.enabled=false
- xpack.security.enrollment.enabled=false
- ES_JAVA_OPTS=-Xms1024m -Xmx1024m
ports:
- "9200:9200"
volumes:
deluge-volume-1:
deluge-volume-2:
deluge-volume-3: