-
-
Notifications
You must be signed in to change notification settings - Fork 32
/
docker-compose.yaml
139 lines (129 loc) · 3.67 KB
/
docker-compose.yaml
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
version: "3"
services:
traefik:
image: "traefik:latest"
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.tls-resolver.acme.tlschallenge=true"
- "--certificatesresolvers.tls-resolver.acme.email=contact@nakama.social"
- "--certificatesresolvers.tls-resolver.acme.storage=/letsencrypt/acme.json"
- "--log.level=ERROR"
# - "--api.insecure=true"
# - "--certificatesresolvers.tls-resolver.acme.caserver=https://acme-staging-v02.api.letsencrypt.org/directory"
ports:
- "80:80"
- "443:443"
# - "8085:8080"
volumes:
- "./letsencrypt:/letsencrypt"
- "/var/run/docker.sock:/var/run/docker.sock"
restart: "always"
depends_on:
- nakama
nakama:
# build: .
image: "nicolasparada/nakama:latest"
environment:
ORIGIN: "https://nakama.social"
DATABASE_URL: "postgresql://root@cockroach:26257/nakama?sslmode=disable"
NATS_URL: "nats://nats:4222"
env_file:
- ./.env
# expose:
# - 3000
restart: "always"
depends_on:
- loki
- cockroach
- nats
labels:
- "traefik.enable=true"
- "traefik.http.middlewares.floc.headers.customresponseheaders.interest-cohort=()"
- "traefik.http.routers.nakama.rule=Host(`nakama.social`) || Host(`www.nakama.social`)"
- "traefik.http.routers.nakama.entrypoints=websecure"
- "traefik.http.routers.nakama.tls.certresolver=tls-resolver"
logging:
driver: loki
options:
loki-url: http://localhost:3100/loki/api/v1/push
cockroach:
image: "cockroachdb/cockroach:v23.2.5"
command: "start-single-node --insecure"
volumes:
- "./cockroach-data:/cockroach/cockroach-data"
expose:
- 26257
- 8080
restart: "always"
nats:
image: "nats:latest"
expose:
- 4222
restart: "always"
node-exporter:
image: prom/node-exporter:latest
restart: "always"
volumes:
- "/:/host:ro,rslave"
command:
- "--path.rootfs=/host"
- "--log.level=error"
expose:
- 9100
cadvisor:
image: gcr.io/cadvisor/cadvisor:latest
restart: "always"
volumes:
- "/:/rootfs:ro"
- "/var/run:/var/run:ro"
- "/sys:/sys:ro"
- "/var/lib/docker/:/var/lib/docker:ro"
- "/dev/disk/:/dev/disk:ro"
expose:
- 8080
prometheus:
image: prom/prometheus:latest
depends_on:
- node-exporter
- cadvisor
command:
- "--config.file=/etc/prometheus/prometheus.yml"
- "--storage.tsdb.path=/data"
- "--storage.tsdb.retention.time=7d"
- "--log.level=error"
volumes:
- "./prometheus.yml:/etc/prometheus/prometheus.yml"
- "./prometheus-data:/data"
expose:
- 9090
restart: "always"
loki:
image: grafana/loki:latest
command:
- "-config.file=/etc/loki/local-config.yaml"
- "-log.level=error"
ports:
- "3100:3100"
restart: "always"
volumes:
- "./loki-data:/loki"
grafana:
image: grafana/grafana:latest
depends_on:
- prometheus
- loki
volumes:
- "./grafana-data:/var/lib/grafana"
# expose:
# - 3000
restart: "always"
labels:
- "traefik.enable=true"
- "traefik.http.routers.grafana.rule=Host(`grafana.nakama.social`)"
- "traefik.http.routers.grafana.entrypoints=websecure"
- "traefik.http.routers.grafana.tls.certresolver=tls-resolver"