-
Notifications
You must be signed in to change notification settings - Fork 10
/
docker-compose.yml
94 lines (85 loc) · 2.21 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
91
92
93
94
version: "3.7"
services:
court_server_db:
image: postgres:11-alpine
environment:
- POSTGRES_DB:${DB_NAME}
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASS}
ports:
- "5432:5432" # for debugging db
court_server:
build: .
image: aragon/court-backend
command: npm run start:server:dev
depends_on:
- court_server_db
- loki
ports:
- "${SERVER_PORT}:${SERVER_PORT}"
- "${SERVER_METRICS_PORT}:${SERVER_METRICS_PORT}" # for debugging metrics
volumes:
- ./packages/server/src:/court-backend/packages/server/src
- ./packages/server/test:/court-backend/packages/server/test
env_file:
- .env
logging: &loki
driver: loki
options:
loki-url: http://localhost:3100/loki/api/v1/push
# required to be compatible with k8s metrics
loki-external-labels: container={{.Name}},app=court-backend
court_services:
build: .
image: aragon/court-backend
command: npm run start:services:dev
depends_on:
- court_server
- loki
volumes:
- ./packages/services/bin:/court-backend/packages/services/bin
- ./packages/services/src:/court-backend/packages/services/src
- ./packages/services/test:/court-backend/packages/services/test
env_file:
- .env
logging: *loki
court_backoffice:
build: .
image: aragon/court-backend
command: npm run start:app
depends_on:
- court_server
- loki
ports:
- "3000:3000"
- "35729:35729" # port used for hot-reloading
volumes:
- ./packages/app/src:/court-backend/packages/app/src
- ./packages/app/public:/court-backend/packages/app/public
env_file:
- .env
logging: *loki
## Monitoring containers below
prometheus:
image: prom/prometheus
depends_on:
- court_server
- court_services
volumes:
- ./monitoring/prometheus:/etc/prometheus
loki:
image: grafana/loki
ports:
- "3100:3100"
grafana:
image: grafana/grafana
depends_on:
- prometheus
- loki
ports:
- "5000:3000"
environment:
GF_AUTH_ANONYMOUS_ENABLED: "true"
GF_AUTH_ANONYMOUS_ORG_ROLE: Admin
volumes:
- ./monitoring/grafana/provisioning:/etc/grafana/provisioning