This repository was archived by the owner on Jul 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
71 lines (67 loc) · 1.77 KB
/
docker-compose.yml
File metadata and controls
71 lines (67 loc) · 1.77 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
66
67
68
69
70
71
version: "3"
services:
server:
build: .
ports:
- "127.0.0.1:${SERVER_PORT}:${SERVER_PORT}"
volumes:
- ./secretsanta-firebase-adminsdk.json:/secretsanta-key.json
- ./files:/files
environment:
- SERVER_PORT=$SERVER_PORT
- DATABASE_CONNECTION_STRING=$DATABASE_CONNECTION_STRING
- POSTGRES_NAME=$POSTGRES_NAME
- POSTGRES_PASSWORD=$POSTGRES_PASSWORD
- GOOGLE_APPLICATION_CREDENTIALS=$GOOGLE_APPLICATION_CREDENTIALS
- JWT_SECRET=$JWT_SECRET
- JWT_AUDIENCE=$JWT_AUDIENCE
- JWT_ISSUER=$JWT_ISSUER
- JWT_ACCESS_LIFETIME=$JWT_ACCESS_LIFETIME
- JWT_REFRESH_LIFETIME=$JWT_REFRESH_LIFETIME
- ONESIGNAL_API_KEY=$ONESIGNAL_API_KEY
- ONESIGNAL_APP_ID=$ONESIGNAL_APP_ID
depends_on:
- db
networks:
- db_network
- prometheus_network
restart: always
db:
image: ${POSTGRES_IMAGE}
ports:
- "127.0.0.1:5432:5432"
environment:
POSTGRES_DB: "santa"
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: $POSTGRES_PASSWORD
volumes:
- ./db-data:/var/lib/postgresql/data
- ./sql/init-db.sql:/docker-entrypoint-initdb.d/init-db.sql
networks:
- db_network
restart: always
# Prometheus container to query backend metrics
prometheus:
image: prom/prometheus
restart: always
ports:
- "127.0.0.1:9090:9090"
volumes:
- ./monitoring:/etc/prometheus/
networks:
- prometheus_network
# Grafana container to visualize data
grafana:
image: grafana/grafana:5.1.0
ports:
- "127.0.0.1:3000:3000"
volumes:
- ./monitoring/grafana:/var/lib/grafana
networks:
- prometheus_network
user: "0"
networks:
db_network:
driver: bridge
prometheus_network:
driver: bridge