-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
59 lines (54 loc) · 1.36 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
59 lines (54 loc) · 1.36 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
version: "3"
services:
db:
image: postgres:latest
environment:
POSTGRES_USER: gocity
POSTGRES_PASSWORD: gocity-pwd
POSTGRES_DB: gocity
ports:
- "5432:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck: # To make sure it's ready before go tries to connect
test:
[
"CMD-SHELL",
"sh -c 'pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}'",
]
gocity:
build:
context: .
dockerfile: Dockerfile
environment:
CITY_API_ADDR: 0.0.0.0
CITY_API_PORT: 2022
CITY_API_DB_URL: db #gocity.hponthieu.com
CITY_API_DB_USER: gocity
CITY_API_DB_PWD: gocity-pwd
CITY_API_DB_NAME: gocity
ports:
- 2022:2022
depends_on:
db:
condition: service_healthy # Runs the healthcheck test
prometheus:
image: prom/prometheus:v2.44.0
volumes:
- "./monitor/prom/prometheus.yaml:/etc/prometheus/prometheus.yml"
ports:
- 9090:9090
depends_on:
- gocity
grafana:
image: grafana/grafana
ports:
- 3000:3000
volumes:
- ./monitor/graf/datasources:/etc/grafana/provisioning/datasources
- ./monitor/graf/dashboards:/etc/grafana/provisioning/dashboards
- ./monitor/graf/resources:/var/lib/grafana/dashboards
depends_on:
- gocity
volumes:
postgres-data: