Files
kontor/script/create_container_kontor-echo
tpeetz ad09386a7a
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 4s
update kontor-fiber to use Go Fiber v3
2026-09-20 02:08:56 +02:00

35 lines
900 B
Bash
Executable File

#!/bin/bash
# script/setup: Set up container for the first time after cloning
set -e
cd "$(dirname "$0")/.."
source version
script/bootstrap
echo "==> Setting up container kontor-echo"
if podman image exists localhost/kontor-echo:$kontorVersion; then
echo " => Image localhost/kontor-echo:$kontorVersion available"
fi
if podman container exists kontor-echo; then
if podman ps -q --filter "name=kontor-echo"; then
echo " => kontor-echo is running"
fi
else
podman run -d \
--replace \
--pod kontor \
--name kontor-echo \
--label "io.containers.autoupdate=local" \
--label "PODMAN_SYSTEMD_UNIT=kontor-echo.service" \
--health-cmd='curl -f http://kontor-echo:8400/health || exit 1' \
--health-interval=1s \
--health-timeout=5s \
--health-retries=10 \
localhost/kontor-echo:$kontorVersion
fi