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

29 lines
1011 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 /var/semaphoreui-secret/packages.txt; then
echo "Installing additional system dependencies"
apk add --no-cache --upgrade \
$(cat /var/semaphoreui-secret/packages.txt | xargs)
else
echo "No additional system dependencies to install"
fi
if test -f /var/semaphoreui-secret/requirements.txt; then
echo "Installing additional python dependencies"
pip3 install --upgrade \
-r /var/semaphoreui-secret//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