-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
91 lines (81 loc) · 1.81 KB
/
docker-compose.yml
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
version: '3.9'
volumes:
storage:
services:
api:
networks:
- app
build:
context: src/
ports:
- '8080:8080'
environment:
- DATABASE_FILEPATH=/storage/sheets.db
volumes:
- storage:/storage
healthcheck:
test: ["CMD", "wget", "-nv", "-t1", "--spider", "http://localhost:8080/healthcheck"]
interval: 5s
timeout: 5s
retries: 3
start_period: 1s
postman:
networks:
- app
image: postman/newman:alpine
profiles:
- testing
command:
run DevChallengeExcel.postman_collection.json
-k -r cli
--env-var API_HOST=http://api:8080
--env-var WEBHOOK_TESTER_HOST=http://webhook-tester:8088
--iteration-count 2
volumes:
- ./postman:/etc/newman
depends_on:
api:
condition: service_healthy
webhook-tester:
condition: service_healthy
webhook-tester:
networks:
- app
image: tarampampam/webhook-tester
profiles:
- testing
command: --log-json serve
environment:
- LISTEN_PORT=8088
- STORAGE_DRIVER=memory
ports: ['8088:8088/tcp'] # Open <http://127.0.0.1:8088>
healthcheck:
interval: 2s
timeout: 1s
retries: 3
unit:
image: golang:1.21-alpine
profiles:
- testing
working_dir: /src
command: ["sh", "-c", "./run-unit-test.sh"]
volumes:
- ./src:/src:ro
siege:
networks:
- app
image: yokogawa/siege
profiles:
- testing
command: '--concurrent=1000 --time=60S --internet --file /urls.txt -H "Content-Type: text/json"'
depends_on:
api:
condition: service_healthy
volumes:
- ./siege/urls.txt:/urls.txt
- ./siege/log:/var/log
environment:
- API_HOST=http://api:8080
networks:
app:
driver: bridge