-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
75 lines (75 loc) · 1.83 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
services:
prometheus:
image: "prom/prometheus"
container_name: prometheus-tracker
restart: unless-stopped
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
environment:
- '--config.file=/etc/prometheus/prometheus.yml'
ports:
- "9090:9090"
grafana:
image: grafana/grafana-enterprise
container_name: grafana-tracker
restart: unless-stopped
ports:
- '3000:3000'
postgres:
image: postgres:latest
container_name: postgres-tracker
restart: always
environment:
POSTGRES_USER: tracker
POSTGRES_PASSWORD: tracker
POSTGRES_DB: tracker
TZ: UTC
PGTZ: UTC
ports:
- "5432:5432"
healthcheck:
test: pg_isready -U tracker
migrate:
image: migrate/migrate:latest
container_name: migrate-tracker
volumes:
- ./migrations:/migrations
command:
[
"-path",
"/migrations",
"-database",
"postgresql://tracker:tracker@postgres:5432/tracker?sslmode=disable",
"up"
]
links:
- postgres
depends_on:
postgres:
condition: service_healthy
restart: on-failure
backend:
depends_on:
postgres:
condition: service_healthy
migrate:
condition: service_completed_successfully
restart: on-failure
image: tracker:latest
container_name: backend-tracker
build:
context: .
dockerfile: Dockerfile
environment:
ADDRESS: 0.0.0.0:9999
ANNOUNCE_URL: http://localhost:9999/announce
DSN: "postgresql://tracker:tracker@postgres:5432/tracker?sslmode=disable"
TEMPLATE_PATH: "/app/templates/"
STATIC_PATH: "/app/static/"
ports:
- "9999:9999"
healthcheck:
test: [ "CMD-SHELL", "curl -f http://$$ADDRESS/health" ]
interval: 30s
timeout: 3s
retries: 5