tidying up
This commit is contained in:
parent
7813756c69
commit
08ab1c582c
24 changed files with 105 additions and 324 deletions
|
|
@ -1,25 +0,0 @@
|
|||
ARG factorioVersion=1.1.42
|
||||
|
||||
|
||||
FROM factoriotools/factorio:$factorioVersion
|
||||
|
||||
# In progress
|
||||
# The intention is to remove kafka-pipe and have a
|
||||
# pre-preared Factorio Docker container than can
|
||||
# just run, without needing an additional
|
||||
# container with kcat.
|
||||
|
||||
#RUN apk add --update \
|
||||
# curl \
|
||||
# kafkacat \
|
||||
# ;
|
||||
|
||||
ENV KCAT_CONFIG="/kcat.conf"
|
||||
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
kafkacat \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /
|
||||
COPY kafka-pipe.sh kafka-pipe.sh
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
#!/usr/bin/bash
|
||||
|
||||
# Pipe Docker logs from a Factorio server to a Kafka topic
|
||||
|
||||
echo "Piping logs from $FACTORIO_SERVER_CONTAINER_NAME to $KAFKA_HOST"
|
||||
|
||||
# generate some distinctive key for messages from this server
|
||||
SERVER_HASH=openssl dgst -sha3-512 "$CONFIG/server-settings.json"
|
||||
|
||||
trap endProcess SIGINT
|
||||
endProcess() {
|
||||
echo "Exiting Factorio Events Kafka Pipe"
|
||||
exit
|
||||
}
|
||||
|
||||
while :; do
|
||||
|
||||
sed -n -e 's/^FactorioEvent: //p' |
|
||||
kafkacat -F "$KCAT_PROP_FILE"
|
||||
|
||||
echo "Error - retrying in 10 seconds"
|
||||
|
||||
sleep 10
|
||||
done
|
||||
|
|
@ -1 +0,0 @@
|
|||
enable.idempotence=true
|
||||
Loading…
Add table
Add a link
Reference in a new issue