generated from AlbertHernandez/express-typescript-service-template
-
Notifications
You must be signed in to change notification settings - Fork 77
/
Copy pathdocker-compose.yml
60 lines (58 loc) · 1.31 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
services:
my-service-production:
container_name: my-service-production
build:
target: production
context: .
args:
- PORT=${PORT:-3000}
ports:
- "${PORT:-3000}:${PORT:-3000}"
deploy:
resources:
limits:
cpus: "1"
memory: "512m"
reservations:
cpus: "0.25"
memory: "256m"
my-service-dev:
container_name: my-service-dev
restart: unless-stopped
env_file: .env
build:
target: dev
context: .
args:
- PORT=${PORT:-3000}
ports:
- "${PORT:-3000}:${PORT:-3000}"
- "9229:9229"
volumes:
- ./src:/app/src
deploy:
resources:
limits:
cpus: "1"
memory: "512m"
reservations:
cpus: "0.25"
memory: "256m"
k6:
image: ghcr.io/grafana/xk6-dashboard:0.7.2
container_name: k6
volumes:
- ./tests/performance:/tests/performance
- ./k6-results:/home/k6
ports:
- "5665:5665"
environment:
BASE_URL: "http://host.docker.internal:3000"
K6_WEB_DASHBOARD_EXPORT: "report.html"
K6_WEB_DASHBOARD_PERIOD: "1s"
K6_WEB_DASHBOARD_OPEN: "true"
command: [
"run",
"--out", "web-dashboard",
"/tests/performance/contexts/users/get-users.mjs"
]