-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.prod.yml
117 lines (117 loc) · 4.09 KB
/
docker-compose.prod.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
version: '3.8'
services:
postgres:
container_name: postgres
image: postgres:13-alpine
volumes:
- db:/var/lib/postgresql/data
environment:
POSTGRES_DB: db
POSTGRES_PASSWORD: pass
ports:
- '127.0.0.1:5432:5432'
shm_size: 256mb
restart: unless-stopped
traefik:
container_name: traefik
image: traefik:v2.5.3
command:
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
- "--entrypoints.web.http.redirections.entryPoint.to=websecure"
- "--entrypoints.web.http.redirections.entryPoint.scheme=https"
- "--entrypoints.websecure.address=:443"
- "--certificatesresolvers.myresolver.acme.tlschallenge=true"
#- "--certificatesresolvers.myresolver.acme.caserver=https://acme-staging-v02.api.letsencrypt.org/directory"
- "--certificatesresolvers.myresolver.acme.email=${LETS_ENCRYPT_EMAIL}"
- "--certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json"
ports:
- "80:80"
- "443:443"
volumes:
- "./letsencrypt:/letsencrypt"
- "/var/run/docker.sock:/var/run/docker.sock:ro"
restart: unless-stopped
grafana:
container_name: grafana
image: grafana/grafana:8.1.5
volumes:
- ./grafana/provisioning:/etc/grafana/provisioning
- ./grafana/dashboards:/etc/grafana/dashboards
- grafana-storage:/var/lib/grafana
environment:
PG_HOST: 'postgres:5432'
PG_USER: 'read_user'
PG_PASSWORD: 'read_user_pass'
PG_DB: 'db'
PROM_USER: 'admin'
PROM_HOST: 'http://prometheus:9090'
env_file:
- .env
labels:
- "traefik.enable=true"
- "traefik.http.routers.grafana.rule=Host(`${GRAFANA_HOST_DOMAIN}`)"
- "traefik.http.routers.grafana.entrypoints=websecure"
- "traefik.http.routers.grafana.tls.certresolver=myresolver"
restart: unless-stopped
prometheus:
container_name: prometheus
image: prom/prometheus:v2.30.0
volumes:
- ./prometheus:/etc/prometheus
- prom-storage:/prometheus
command: [ "--config.file=/etc/prometheus/prometheus.yml", "--web.enable-lifecycle", "--web.config.file=/etc/prometheus/web.yml" ]
labels:
- "traefik.enable=true"
- "traefik.http.routers.prometheus.rule=Host(`${PROMETHEUS_HOST_DOMAIN}`)"
- "traefik.http.routers.prometheus.entrypoints=websecure"
- "traefik.http.routers.prometheus.tls.certresolver=myresolver"
restart: unless-stopped
alertmanager:
container_name: alertmanager
image: prom/alertmanager:v0.23.0
command: [ "--config.file=/etc/prometheus/alertmanager.yml", "--storage.path=/alertmanager", "--web.external-url=https://${ALERTMANAGER_HOST_DOMAIN}", "--web.config.file=/etc/prometheus/web.yml" ]
volumes:
- ./prometheus:/etc/prometheus
- alertmanager-storage:/alertmanager
labels:
- "traefik.enable=true"
- "traefik.http.routers.alertmanager.rule=Host(`${ALERTMANAGER_HOST_DOMAIN}`)"
- "traefik.http.routers.alertmanager.entrypoints=websecure"
- "traefik.http.routers.alertmanager.tls.certresolver=myresolver"
restart: unless-stopped
monitor:
container_name: monitor
image: ghcr.io/omni/tokenbridge-monitor:v0.1.6
env_file:
- .env
volumes:
- ./config.yml:/app/config.yml
labels:
- "traefik.enable=true"
- "traefik.http.routers.monitor.rule=Host(`${MONITOR_HOST_DOMAIN}`)"
- "traefik.http.routers.monitor.entrypoints=websecure"
- "traefik.http.routers.monitor.tls.certresolver=myresolver"
restart: unless-stopped
fix_block_timestamps:
container_name: fix_block_timestamps
image: ghcr.io/omni/tokenbridge-monitor:v0.1.6
entrypoint: [ "./fix_block_timestamps" ]
env_file:
- .env
volumes:
- ./config.yml:/app/config.yml
reprocess_block_range:
container_name: fix_block_timestamps
image: ghcr.io/omni/tokenbridge-monitor:v0.1.6
entrypoint: [ "./reprocess_block_range" ]
env_file:
- .env
volumes:
- ./config.yml:/app/config.yml
volumes:
db:
grafana-storage:
prom-storage:
alertmanager-storage: