-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.test.yaml
More file actions
65 lines (61 loc) · 1.76 KB
/
docker-compose.test.yaml
File metadata and controls
65 lines (61 loc) · 1.76 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
65
services:
# Creates TLS certificates and a sample log file
setup:
image: alpine:3.23
volumes:
- test-data:/data
- ./test/setup.sh:/usr/bin/setup.sh
healthcheck:
test: ["CMD", "test", "-f", "/data/ready"]
interval: 1s
start_period: 1s
timeout: 1s
retries: 30
command: ["sh", "/usr/bin/setup.sh"]
# Configured to use a vector receiver
# Writes received logs into /data/received.ndjson
aggregator:
image: timberio/vector:0.53.0-alpine
command: ["--config", "/etc/vector/vector.yaml"]
depends_on:
setup:
condition: service_healthy
volumes:
- test-data:/data
- ./test/ci-vector-aggregator.yaml:/etc/vector/vector.yaml:ro
healthcheck:
test: ["CMD-SHELL", "nc -z 127.0.0.1 6000 || exit 1"]
interval: 2s
timeout: 1s
retries: 30
# Uses a file source for test
logs-to-vector:
build:
context: .
dockerfile: Dockerfile
depends_on:
aggregator:
condition: service_healthy
environment:
VECTOR_ENDPOINT: "aggregator:6000"
VECTOR_TLS_CA_FILE: "/data/certs/ca.crt"
VECTOR_TLS_CRT_FILE: "/data/certs/client.crt"
VECTOR_TLS_KEY_FILE: "/data/certs/client.key"
VECTOR_TLS_VERIFY_CERTIFICATE: "true"
VECTOR_TLS_VERIFY_HOSTNAME: "true"
volumes:
- test-data:/data
- logs-to-vector-state:/var/lib/logs-to-vector
- ./test/source-file.yaml:/etc/vector/sources/source-file.yaml:ro
# Waits for logs to be collected then performs strict order validation
sut:
image: alpine:3.23
depends_on:
- logs-to-vector
volumes:
- test-data:/data
- ./test/sut.sh:/usr/bin/sut.sh
command: ["sh", "/usr/bin/sut.sh"]
volumes:
test-data: {}
logs-to-vector-state: {}