2024-12-04 19:04:57 -03:00
|
|
|
# This compose spec contains the basic setup for running integration tests with the
|
2025-01-19 10:32:27 -03:00
|
|
|
# test runner outside of a container. This is ideal for local development.
|
2024-11-01 18:07:08 -03:00
|
|
|
|
|
|
|
services:
|
2025-01-19 10:32:27 -03:00
|
|
|
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:
|
|
|
|
- shared-volume-1:/var/lib/deluge1
|
|
|
|
- shared-volume-2:/var/lib/deluge2
|
|
|
|
- shared-volume-3:/var/lib/deluge3
|
|
|
|
healthcheck:
|
|
|
|
timeout: 10s
|
|
|
|
test: [ "CMD", "test", "-f", "/.done" ]
|
|
|
|
retries: 10
|
|
|
|
interval: 1s
|
|
|
|
|
2024-11-01 18:07:08 -03:00
|
|
|
deluge-1:
|
|
|
|
image: codexstorage/deluge
|
|
|
|
container_name: deluge-1
|
|
|
|
environment:
|
|
|
|
- DELUGE_RPC_PORT=6890
|
|
|
|
- DELUGE_LISTEN_PORTS=6891,6892
|
2024-12-05 09:47:41 -03:00
|
|
|
- DELUGE_LOG_LEVEL=${DELUGE_LOG_LEVEL:-info}
|
2024-12-11 15:43:52 -03:00
|
|
|
- DELUGE_NODE_ID=deluge-1
|
2024-11-01 18:07:08 -03:00
|
|
|
volumes:
|
2025-01-19 10:32:27 -03:00
|
|
|
- shared-volume-1:/var/lib/deluge
|
2024-11-01 18:07:08 -03:00
|
|
|
ports:
|
|
|
|
- "6890:6890"
|
|
|
|
- "6891-6892:6891-6892"
|
2025-01-19 10:32:27 -03:00
|
|
|
depends_on:
|
|
|
|
clean-volumes:
|
|
|
|
condition: service_healthy
|
|
|
|
|
|
|
|
agent-1:
|
|
|
|
image: bittorrent-benchmarks:test
|
|
|
|
container_name: agent-1
|
|
|
|
entrypoint: [ "poetry", "run", "bittorrent-benchmarks",
|
|
|
|
"agent", "experiments.local.yaml", "deluge_agent", "--port", "9001" ]
|
|
|
|
environment:
|
|
|
|
- TORRENTS_ROOT=/var/lib/deluge/downloads
|
|
|
|
volumes:
|
|
|
|
- shared-volume-1:/var/lib/deluge
|
|
|
|
ports:
|
|
|
|
- "9001:9001"
|
2024-11-01 18:07:08 -03:00
|
|
|
|
|
|
|
deluge-2:
|
|
|
|
image: codexstorage/deluge
|
|
|
|
container_name: deluge-2
|
|
|
|
environment:
|
|
|
|
- DELUGE_RPC_PORT=6893
|
|
|
|
- DELUGE_LISTEN_PORTS=6894,6895
|
2024-12-05 09:47:41 -03:00
|
|
|
- DELUGE_LOG_LEVEL=${DELUGE_LOG_LEVEL:-info}
|
2024-12-11 15:43:52 -03:00
|
|
|
- DELUGE_NODE_ID=deluge-2
|
2024-11-01 18:07:08 -03:00
|
|
|
volumes:
|
2025-01-19 10:32:27 -03:00
|
|
|
- shared-volume-2:/var/lib/deluge
|
2024-11-01 18:07:08 -03:00
|
|
|
ports:
|
|
|
|
- "6893:6893"
|
|
|
|
- "6894-6895:6894-6895"
|
2025-01-19 10:32:27 -03:00
|
|
|
depends_on:
|
|
|
|
clean-volumes:
|
|
|
|
condition: service_healthy
|
|
|
|
|
|
|
|
agent-2:
|
|
|
|
image: bittorrent-benchmarks:test
|
|
|
|
container_name: agent-2
|
|
|
|
entrypoint: [ "poetry", "run", "bittorrent-benchmarks", "agent",
|
|
|
|
"experiments.local.yaml", "deluge_agent", "--port", "9002" ]
|
|
|
|
environment:
|
|
|
|
- TORRENTS_ROOT=/var/lib/deluge/downloads
|
|
|
|
volumes:
|
|
|
|
- shared-volume-2:/var/lib/deluge
|
|
|
|
ports:
|
|
|
|
- "9002:9002"
|
2024-11-01 18:07:08 -03:00
|
|
|
|
2024-11-03 08:39:33 -03:00
|
|
|
deluge-3:
|
|
|
|
image: codexstorage/deluge
|
|
|
|
container_name: deluge-3
|
|
|
|
environment:
|
|
|
|
- DELUGE_RPC_PORT=6896
|
|
|
|
- DELUGE_LISTEN_PORTS=6897,6898
|
2024-12-05 09:47:41 -03:00
|
|
|
- DELUGE_LOG_LEVEL=${DELUGE_LOG_LEVEL:-info}
|
2024-12-11 15:43:52 -03:00
|
|
|
- DELUGE_NODE_ID=deluge-3
|
2024-11-03 08:39:33 -03:00
|
|
|
volumes:
|
2025-01-19 10:32:27 -03:00
|
|
|
- shared-volume-3:/var/lib/deluge
|
2024-11-03 08:39:33 -03:00
|
|
|
ports:
|
|
|
|
- "6896:6896"
|
|
|
|
- "6897-6898:6897-6898"
|
2025-01-19 10:32:27 -03:00
|
|
|
depends_on:
|
|
|
|
clean-volumes:
|
|
|
|
condition: service_healthy
|
|
|
|
|
|
|
|
agent-3:
|
|
|
|
image: bittorrent-benchmarks:test
|
|
|
|
container_name: agent-3
|
|
|
|
entrypoint: [ "poetry", "run", "bittorrent-benchmarks", "agent", "experiments.local.yaml",
|
|
|
|
"deluge_agent", "--port", "9003" ]
|
|
|
|
environment:
|
|
|
|
- TORRENTS_ROOT=/var/lib/deluge/downloads
|
|
|
|
volumes:
|
|
|
|
- shared-volume-3:/var/lib/deluge
|
|
|
|
ports:
|
|
|
|
- "9003:9003"
|
2024-11-03 08:39:33 -03:00
|
|
|
|
2024-11-01 18:07:08 -03:00
|
|
|
tracker:
|
|
|
|
image: codexstorage/bittorrent-tracker
|
|
|
|
container_name: tracker
|
|
|
|
ports:
|
2025-01-19 10:32:27 -03:00
|
|
|
- "8000:8000"
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
shared-volume-1:
|
|
|
|
shared-volume-2:
|
|
|
|
shared-volume-3:
|