Files
probo/entrypoint.sh
Bryan Frimin 63bf983e59 Refactor entrypoint
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-06 12:11:12 +01:00

18 lines
533 B
Bash

#!/bin/bash
set -e
# Configuration file path
CONFIG_FILE="${CONFIG_FILE:-/etc/probod/config.yml}"
# Check if config file already exists (e.g., mounted from ConfigMap)
if [ -f "$CONFIG_FILE" ]; then
echo "Using existing configuration file at: $CONFIG_FILE"
else
echo "Generating configuration file from environment variables at: $CONFIG_FILE"
# Generate configuration from environment variables
probod-bootstrap -output "$CONFIG_FILE"
fi
# Execute probod with the generated config
exec probod -cfg-file "$CONFIG_FILE" "$@"