-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathdocker-compose.yaml
98 lines (92 loc) · 2.41 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
x-common-labels: &common-labels
labels:
# Labels to be applied to all services
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.2.0"
org.opencontainers.image.authors: "kile@killua.dev"
services:
proxy:
container_name: zmq_proxy
image: ghcr.io/kile/zmq-proxy:latest
build:
context: "./zmq_proxy"
target: ${MODE:-prod} # dev/prod
args:
- "MYUID=${MYUID:-1000}"
- "MYGID=${MYGID:-1000}"
environment:
- ZMQ_CLIENT_ADDRESS=tcp://*:5559
- ZMQ_SERVER_ADDRESS=tcp://*:5560
restart: unless-stopped
<<: *common-labels
api:
image: ghcr.io/kile/killua-api:latest
build:
context: ./
dockerfile: ./api/Dockerfile
target: ${MODE:-prod} # dev/prod
args:
- "MYUID=${MYUID:-1000}"
- "MYGID=${MYGID:-1000}"
container_name: rust_api
ports:
- "6060:7650"
volumes:
- ./cards.json:/app/cards.json
- ./assets:/app/assets
environment:
- ZMQ_ADDRESS=tcp://proxy:5559
env_file:
- .env
restart: unless-stopped
depends_on:
- proxy
<<: *common-labels
bot:
image: ghcr.io/kile/killua-bot:latest
build:
context: ./
dockerfile: ./killua/Dockerfile
target: ${MODE:-prod} # dev/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
depends_on:
- api
- proxy
volumes:
- ./assets:/app/assets
<<: *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:/etc/grafana/provisioning/datasources
env_file:
- .env
prometheus:
image: prom/prometheus
container_name: prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
ports:
- 9090:9090
restart: unless-stopped
volumes:
- ./prometheus:/etc/prometheus
- prom_data:/prometheus
volumes:
prom_data: