-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdocker-compose.e2e-controller.yml
More file actions
52 lines (49 loc) · 1.58 KB
/
Copy pathdocker-compose.e2e-controller.yml
File metadata and controls
52 lines (49 loc) · 1.58 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
services:
# rqlite — distributed SQLite used by the controller's RNIC registry.
rqlite:
image: rqlite/rqlite:8.37.0
command: -http-addr "0.0.0.0:4001"
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://localhost:4001/status"]
interval: 3s
timeout: 5s
retries: 5
start_period: 5s
# Controller — gRPC service that manages agent registration and pinglists.
controller:
build:
context: .
dockerfile: Dockerfile.controller
environment:
- RPINGMESH_DATABASE_URI=http://rqlite:4001
- RPINGMESH_LISTEN_ADDR=:50051
- RPINGMESH_LOG_LEVEL=debug
depends_on:
rqlite:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "nc -z localhost 50051"]
interval: 3s
timeout: 5s
retries: 5
start_period: 5s
# E2E test runner — simulates agent behaviour via GRPCControllerClient.
e2e_test:
build:
context: .
dockerfile: Dockerfile.e2e-controller
environment:
- CONTROLLER_ADDR=controller:50051
- RQLITE_URL=http://rqlite:4001
- CGO_ENABLED=0
depends_on:
controller:
condition: service_healthy
command: >
go test -v -count=1 -timeout 120s ./e2e/controller/...
restart: "no"
# NOTE: no top-level `volumes:` for a Go module/build cache here. Dependency
# resolution happens at image-build time via BuildKit cache mounts in
# Dockerfile.e2e-controller (`--mount=type=cache,target=/go/pkg/mod`), not at
# container-run time, so a named volume mounted into this service would
# never be populated or read.