-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.e2e.yml
More file actions
64 lines (60 loc) · 1.69 KB
/
compose.e2e.yml
File metadata and controls
64 lines (60 loc) · 1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# E2e test compose file. Builds sluice from source and runs e2e tests
# inside a test-runner container that shares the network with tun2proxy,
# so all test traffic routes through sluice's SOCKS5 proxy.
#
# Usage: docker compose -f compose.e2e.yml up --build --abort-on-container-exit --exit-code-from test-runner
services:
sluice:
build: .
restart: "no"
environment:
- SLUICE_AGENT_CONTAINER=test-runner
volumes:
- sluice-vault:/home/sluice/.sluice
- sluice-audit:/var/log/sluice
- sluice-ca:/home/sluice/ca
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:3000/healthz"]
interval: 5s
timeout: 3s
retries: 5
start_period: 5s
networks: [internal, external]
tun2proxy:
image: ghcr.io/tun2proxy/tun2proxy-alpine:latest
restart: "no"
cap_add: [NET_ADMIN]
devices:
- /dev/net/tun:/dev/net/tun
command: ["--proxy", "socks5://sluice:1080", "--bypass", "127.0.0.0/8", "--bypass", "::1/128"]
healthcheck:
test: ["CMD-SHELL", "ip link show tun0 || exit 1"]
interval: 5s
timeout: 3s
retries: 5
start_period: 5s
networks: [internal]
depends_on:
sluice:
condition: service_healthy
test-runner:
build:
context: .
dockerfile: Dockerfile.e2e
restart: "no"
network_mode: "service:tun2proxy"
environment:
- SSL_CERT_FILE=/usr/local/share/ca-certificates/sluice/sluice-ca.crt
volumes:
- sluice-ca:/usr/local/share/ca-certificates/sluice:ro
depends_on:
tun2proxy:
condition: service_healthy
networks:
internal:
internal: true
external: {}
volumes:
sluice-vault:
sluice-audit:
sluice-ca: