add project version to docker env

This commit is contained in:
Adam 2022-01-09 11:04:15 +01:00
parent 77429f35bf
commit e20f51f446
6 changed files with 6 additions and 0 deletions

View file

@ -44,6 +44,7 @@ val dockerEnv by tasks.registering(WriteProperties::class) {
setOutputFile(dockerSrcDir.file(".env"))
properties(
"COMPOSE_PROJECT_NAME" to dockerComposeProjectName,
"KAFKATORIO_VERSION" to project.version,
)
}

View file

@ -1,3 +1,4 @@
# Do not edit manually. This file was created with task 'dockerEnv'
COMPOSE_PROJECT_NAME=kafkatorio
FACTORIO_VERSION=1.1.50
KAFKATORIO_VERSION=0.2.1

View file

@ -1,2 +1,3 @@
# Do not edit manually. This file was created with task 'dockerEnv'
COMPOSE_PROJECT_NAME=kafkatorio
KAFKATORIO_VERSION=0.2.1

View file

@ -1,2 +1,3 @@
# Do not edit manually. This file was created with task 'dockerEnv'
COMPOSE_PROJECT_NAME=kafkatorio
KAFKATORIO_VERSION=0.2.1

View file

@ -13,6 +13,7 @@ services:
- "kafkatorio-nw"
environment:
FACTORIO_SERVER_CONTAINER_NAME: "factorio-server"
KAFKATORIO_VERSION: $KAFKATORIO_VERSION
KAFKA_HOST: "kafka:29092"
volumes:
# Windows (requires privileged/root)

View file

@ -2,6 +2,7 @@
# Pipe Docker logs from a Factorio server to a Kafka topic
echo "Kafkatorio-Pipe version $KAFKATORIO_VERSION"
echo "Piping logs from $FACTORIO_SERVER_CONTAINER_NAME to $KAFKA_HOST"
trap endProcess SIGINT