-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
156 lines (147 loc) · 5.27 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
name: "master-server"
services:
traefik:
container_name: traefik
image: traefik:latest
restart: always
ports:
- "80:80"
- "443:443"
- "5432:5432"
environment:
DO_AUTH_TOKEN: ${DO_AUTH_TOKEN}
labels:
- "traefik.http.routers.traefik.rule=Host(`traefik.${HELIOS_DOMAIN}`)"
- "traefik.http.routers.traefik.entrypoints=websecure"
- "traefik.http.routers.traefik.tls.certresolver=myresolver"
- "traefik.http.routers.traefik.service=api@internal"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./compose/traefik/traefik.yml:/etc/traefik/traefik.yml
- ./compose/traefik/dynamic_conf.yml:/etc/traefik/dynamic_conf.yml
logging:
driver: "loki"
options:
loki-url: "https://loki.${HELIOS_DOMAIN}/loki/api/v1/push"
prometheus:
container_name: prometheus
image: prom/prometheus:latest
restart: always
ports:
- "9090:9090"
volumes:
- ./compose/prometheus/:/etc/prometheus/
- prometheus-volume:/prometheus
command:
- --config.file=/etc/prometheus/prometheus.yml
- --storage.tsdb.path=/prometheus
labels:
- "traefik.http.routers.prometheus.rule=Host(`prometheus.${HELIOS_DOMAIN}`)"
- "traefik.http.routers.prometheus.entrypoints=websecure"
- "traefik.http.routers.prometheus.tls.certresolver=myresolver"
grafana:
container_name: grafana
image: grafana/grafana:latest
restart: always
ports:
- "3000:3000"
environment:
- GF_SECURITY_ADMIN_USER=${GRAFANA_USER}
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_PASSWORD}
- GF_INSTALL_PLUGINS=grafana-piechart-panel
volumes:
- ./compose/grafana/provisioning/:/etc/grafana/provisioning/
- grafana-volume:/var/lib/grafana
labels:
- "traefik.http.routers.grafana.rule=Host(`grafana.${HELIOS_DOMAIN}`)"
- "traefik.http.routers.grafana.entrypoints=websecure"
- "traefik.http.routers.grafana.tls.certresolver=myresolver"
- "traefik.http.services.grafana.loadbalancer.server.port=3000"
logging:
driver: "loki"
options:
loki-url: "https://loki.${HELIOS_DOMAIN}/loki/api/v1/push"
loki:
container_name: loki
image: grafana/loki:latest
restart: always
ports:
- "3100:3100"
volumes:
- ./compose/loki/loki-config.yaml:/etc/loki/loki-config.yaml
- loki-volume:/data/loki
command: -config.file=/etc/loki/loki-config.yaml
labels:
- "traefik.http.routers.loki.rule=Host(`loki.${HELIOS_DOMAIN}`)"
- "traefik.http.routers.loki.entrypoints=websecure"
- "traefik.http.routers.loki.tls.certresolver=myresolver"
promtail:
container_name: promtail
image: grafana/promtail:latest
restart: always
volumes:
- /var/lib/docker/containers:/var/lib/docker/containers:ro
- ./compose/promtail/promtail-config.yaml:/etc/promtail/promtail-config.yaml
command: -config.file=/etc/promtail/promtail-config.yaml
labels:
- "traefik.enable=false"
master-backend:
container_name: master-backend
image: ghcr.io/heliosshieldproject/master-backend-rust:latest
restart: always
ports:
- "${MASTER_BACKEND_PORT}:${MASTER_BACKEND_PORT}"
- "${MASTER_METRICS_PORT}:${MASTER_METRICS_PORT}"
depends_on:
- database
environment:
- MASTER_BACKEND_URL=${MASTER_BACKEND_URL}
- MASTER_METRICS_URL=${MASTER_METRICS_URL}
- DATABASE_URL=${DATABASE_URL}
- JWT_ACCESS_SECRET=${JWT_ACCESS_SECRET}
- JWT_REFRESH_SECRET=${JWT_REFRESH_SECRET}
- RUST_LOG=${RUST_LOG}
- OAUTH_DISCORD_CLIENT_SECRET=${OAUTH_DISCORD_CLIENT_SECRET}
- OAUTH_DISCORD_CLIENT_ID=${OAUTH_DISCORD_CLIENT_ID}
- OAUTH_GITHUB_CLIENT_SECRET=${OAUTH_GITHUB_CLIENT_SECRET}
- OAUTH_GITHUB_CLIENT_ID=${OAUTH_GITHUB_CLIENT_ID}
- OAUTH_GOOGLE_CLIENT_SECRET=${OAUTH_GOOGLE_CLIENT_SECRET}
- OAUTH_GOOGLE_CLIENT_ID=${OAUTH_GOOGLE_CLIENT_ID}
- RESEND_API_KEY=${RESEND_API_KEY}
- SERVER_MODE=${SERVER_MODE}
labels:
- "traefik.http.routers.master-backend.rule=Host(`api.${HELIOS_DOMAIN}`)"
- "traefik.http.routers.master-backend.entrypoints=websecure"
- "traefik.http.routers.master-backend.tls.certresolver=myresolver"
- "traefik.http.services.backend.loadbalancer.server.port=${MASTER_BACKEND_PORT}"
logging:
driver: "loki"
options:
loki-url: "https://loki.${HELIOS_DOMAIN}/loki/api/v1/push"
database:
container_name: database
image: postgres:16
restart: unless-stopped
environment:
POSTGRES_DB: ${DATABASE_NAME}
POSTGRES_USER: ${DATABASE_USER}
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
ports:
- "${DATABASE_PORT}:${DATABASE_PORT}"
command: -p ${DATABASE_PORT}
volumes:
- database-volume:/var/lib/postgresql/data
labels:
- "traefik.tcp.routers.database.rule=HostSNI(`database.${HELIOS_DOMAIN}`)"
- "traefik.tcp.routers.database.entrypoints=tcp"
- "traefik.tcp.routers.database.tls.certresolver=myresolver"
- "traefik.tcp.services.database.loadbalancer.server.port=${DATABASE_PORT}"
logging:
driver: "loki"
options:
loki-url: "https://loki.${HELIOS_DOMAIN}/loki/api/v1/push"
volumes:
database-volume:
prometheus-volume:
grafana-volume:
loki-volume: