-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
140 lines (121 loc) · 3.7 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
version: "3.9"
services:
## Factorio game server that players will connect to
factorio-server:
image: factoriotools/factorio:${FACTORIO_VERSION}
container_name: "factorio-server"
restart: unless-stopped
profiles: [ "factorio", "kafkatorio" ]
networks:
- kafkatorio-infra-nw
ports:
- "34198:34197/udp" # factorio
- "27016:27015/tcp" # rcon
volumes:
- "./factorio-server:/factorio"
logging:
# set up syslog, so logs can be forwarded to Kafkatorio
driver: syslog
options:
syslog-address: ${SYSLOG_ADDRESS}
syslog-format: "rfc5424"
# set the tag to be a JWT, containing the server short-ID
tag: ${KAFKATORIO_TOKEN}
## Kafkatorio Web Map host
web-map:
image: ${REGISTRY_HOST}/dev.adamko.kafkatorio/web-map:${KAFKATORIO_VERSION}
container_name: web-map
profiles: [ "infra", "kafkatorio" ]
restart: unless-stopped
networks:
- kafkatorio-infra-nw
## Process Kafkatorio events
events-processors:
image: ${REGISTRY_HOST}/dev.adamko.kafkatorio/events-processors:${KAFKATORIO_VERSION}
container_name: events-processors
restart: unless-stopped
profiles: [ "infra", "kafkatorio" ]
environment:
KAFKA_BOOTSTRAP_SERVERS: "kafka:29092"
networks:
- kafkatorio-infra-nw
depends_on:
- infra-kafka
secrets:
- source: kafkatorio_config
target: /.secret.config.yml
## Receives packets from the Factorio Server, forwarded via Docker syslog-plugin
events-server-syslog:
image: ${REGISTRY_HOST}/dev.adamko.kafkatorio/events-server-syslog:${KAFKATORIO_VERSION}
container_name: events-server-syslog
restart: unless-stopped
profiles: [ "infra", "kafkatorio" ]
environment:
KAFKA_BOOTSTRAP_SERVERS: "kafka:29092"
SOCKET_SERVER_HOST: "0.0.0.0"
SOCKET_SERVER_PORT: "9002"
ports:
- "12035:9002" # syslog socket
networks:
- kafkatorio-infra-nw
depends_on:
- infra-kafka
- events-processors
secrets:
- source: kafkatorio_config
target: /.secret.config.yml
## Hosts map-tiles and forwards websocket messages to the web-map browsers
events-server-web:
image: ${REGISTRY_HOST}/dev.adamko.kafkatorio/events-server-web:${KAFKATORIO_VERSION}
container_name: events-server-web
restart: unless-stopped
profiles: [ "infra", "kafkatorio" ]
environment:
KAFKA_BOOTSTRAP_SERVERS: "kafka:29092"
WEB_SERVER_PORT: "80"
ports:
- "12080:80" # http and ws
networks:
- kafkatorio-infra-nw
depends_on:
- infra-kafka
- events-processors
secrets:
- source: kafkatorio_config
target: /.secret.config.yml
## An instance of Kafka
infra-kafka:
image: ${REGISTRY_HOST}/dev.adamko.kafkatorio/kafka-kraft:${KAFKATORIO_VERSION}
container_name: infra-kafka
restart: unless-stopped
profiles: [ "infra", "kafka" ]
networks:
kafkatorio-infra-nw:
aliases: [ kafka ]
volumes:
- "./config/kafka-server.properties:/kafka/server.properties"
ports:
# note: other Docker containers should use 29092
- "9092:9092"
- "9093:9093"
## web-based GUI for Kafka
infra-kafka-ui:
image: provectuslabs/kafka-ui:v0.4.0
container_name: infra-kafka-ui
restart: unless-stopped
profiles: [ "infra", "kafka" ]
networks:
- kafkatorio-infra-nw
ports:
- "18090:8080"
depends_on:
- infra-kafka
environment:
KAFKA_CLUSTERS_0_NAME: "${COMPOSE_PROJECT_NAME}"
KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: "kafka:29092"
secrets:
kafkatorio_config:
file: ./.secret.kafkatorio-config.yml
networks:
kafkatorio-infra-nw:
kafkatorio-game-nw: