-
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
174 lines (165 loc) · 4.56 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
174 lines (165 loc) · 4.56 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
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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
x-common-labels: &common-labels
labels:
org.opencontainers.image.source: https://github.com/kile/Killua
org.opencontainers.image.title: "Killua"
org.opencontainers.image.description: "The Killua Discord bot with Rust API and ZMQ Proxy"
org.opencontainers.image.version: "1.5.0"
org.opencontainers.image.authors: "kile@killua.dev"
services:
proxy:
container_name: zmq_proxy
image: ghcr.io/kile/zmq-proxy:latest
logging:
driver: "json-file"
options:
max-file: "3" # number of files or file count
max-size: "10m" # file size
build:
context: "./zmq_proxy"
target: ${MODE:-prod}
args:
- "MYUID=${MYUID:-1000}"
- "MYGID=${MYGID:-1000}"
environment:
- ZMQ_API_ADDRESS=tcp://*:5559
- ZMQ_BOT_ADDRESS=tcp://*:5560
- ZMQ_SCRIPT_ADDRESS=tcp://*:5558
ports:
- "5558:5558/tcp"
restart: unless-stopped
<<: *common-labels
api:
image: ghcr.io/kile/killua-api:latest
build:
context: ./
dockerfile: ./api/Dockerfile
target: ${MODE:-prod}
args:
- "MYUID=${MYUID:-1000}"
- "MYGID=${MYGID:-1000}"
container_name: rust_api
ports:
- "6060:7650"
volumes:
- ./cards.json:/app/cards.json
- ./assets:/app/assets
- ./pipes:/app/pipes
environment:
- ZMQ_ADDRESS=tcp://proxy:5559
env_file:
- .env
restart: unless-stopped
depends_on:
- proxy
logging:
driver: "json-file"
options:
max-file: "5" # number of files or file count
max-size: "10m" # file size
<<: *common-labels
bot:
image: ghcr.io/kile/killua-bot:latest
build:
context: ./
dockerfile: ./killua/Dockerfile
target: ${MODE:-prod}
args:
- "MYUID=${MYUID:-1000}"
- "MYGID=${MYGID:-1000}"
container_name: python_bot
restart: unless-stopped
environment:
- PORT=6060
- ZMQ_ADDRESS=tcp://proxy:5560
env_file:
- .env
volumes:
- ./assets:/app/assets
depends_on:
- api
- proxy
logging:
driver: "json-file"
options:
max-file: "10" # number of files or file count
max-size: "10m" # file size
<<: *common-labels
grafana:
image: grafana/grafana:10.4.2
restart: unless-stopped
ports:
- '3000:3000'
volumes:
- ./grafana/dashboard.yml:/etc/grafana/provisioning/dashboards/main.yaml
- ./grafana/dashboards:/var/lib/grafana/dashboards
- ./grafana/datasources:/etc/grafana/provisioning/datasources
env_file:
- .env
logging:
driver: "json-file"
options:
max-file: "3" # number of files or file count
max-size: "10m" # file size
prometheus:
image: prom/prometheus
container_name: prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
restart: unless-stopped
volumes:
- ./prometheus:/etc/prometheus
- prom_data:/prometheus
logging:
driver: "json-file"
options:
max-file: "3" # number of files or file count
max-size: "10m" # file size
loki:
image: grafana/loki:latest
container_name: loki
command: -target=all -config.file=/etc/loki/config.yml
volumes:
- ./loki/config.yml:/etc/loki/config.yml
- loki_data:/loki # Persistent data directory
- loki_tmp:/tmp/loki # Optional safeguard
logging:
driver: "json-file"
options:
max-file: "5"
max-size: "10m"
alloy:
image: grafana/alloy:latest
container_name: alloy
volumes:
- ./alloy/config.alloy:/etc/alloy/config.alloy
- ./logs:/tmp/app-logs/
- /var/run/docker.sock:/var/run/docker.sock
command: run --server.http.listen-addr=0.0.0.0:12345 --storage.path=/var/lib/alloy/data /etc/alloy/config.alloy
depends_on:
- loki
logging:
driver: "json-file"
options:
max-file: "5" # number of files or file count
max-size: "50m" # file size
node-exporter:
image: quay.io/prometheus/node-exporter:latest
container_name: node-exporter
# Mount the host filesystem so we get real host metrics (not container metrics)
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro
command:
- '--path.procfs=/host/proc'
- '--path.sysfs=/host/sys'
- '--path.rootfs=/rootfs'
logging:
driver: "json-file"
options:
max-file: "3" # number of files or file count
max-size: "10m" # file size
volumes:
prom_data:
loki_data:
loki_tmp: