-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
81 lines (77 loc) · 1.56 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
services:
jwt:
restart: unless-stopped
build:
context: .
dockerfile: Dockerfile
expose:
- 8080
command: ./main
depends_on:
cache:
condition: service_healthy
secrets:
- jwt_key
develop:
watch:
- action: rebuild
path: ./cmd
- action: rebuild
path: ./pkg
- action: rebuild
path: ./internal
deploy:
resources:
limits:
cpus: '0.25'
cache:
container_name: jwt-cache
image: redis:latest
restart: unless-stopped
ports:
- "6379:6379"
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 1s
timeout: 5s
retries: 10
start_period: 5s
nginx:
container_name: jwt-nginx
restart: unless-stopped
image: nginx:latest
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- jwt
ports:
- "4000:4000"
k6:
container_name: jwt-k6
build:
context: ./load-tests
dockerfile: Dockerfile.k6
volumes:
- ./load-tests:/tests
- ./load-test-output:/output
environment:
- K6_DASHBOARD=true
- K6_DASHBOARD_PORT=5665
- K6_DASHBOARD_HOST=0.0.0.0
ports:
- "5665:5665"
command: run --out dashboard /tests/test.js
depends_on:
jwt:
condition: service_started
nginx:
condition: service_started
cache:
condition: service_healthy
profiles:
- load-test
networks:
- default
secrets:
jwt_key:
file: ./secrets/jwt_key.txt