helm-charts/charts/semaphoreui/templates/entrypoint.sh
2024-10-21 18:26:17 +02:00

29 lines
974 B
Bash

apiVersion: v1
kind: ConfigMap
metadata:
name: semaphoreui-entrypoint
namespace: {{ .Values.namespace | default "default" }}
labels:
{{- include "lib.labels" . | nindent 4}}
data:
entrypoint.sh: |
#!/bin/sh
echo "creating /etc/semaphore/config.json"
cp /var/semaphoreui-secret/config.json /etc/semaphore/config.json
if test -f /etc/semaphore/packages.txt; then
echo "Installing additional system dependencies"
apk add --no-cache --upgrade \
$(cat /etc/semaphore/packages.txt | xargs)
else
echo "No additional system dependencies to install"
fi
if test -f /etc/semaphore/requirements.txt; then
echo "Installing additional python dependencies"
pip3 install --upgrade \
-r /etc/semaphore/requirements.txt
else
echo "No additional python dependencies to install"
fi
echo "Starting semapore server"
exec /usr/local/bin/semaphore server --config /etc/semaphore/config.json