Files
ntfy_alerts/entrypoint.sh
Félix MARQUET be9d7299cd Update entrypoint.sh
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-24 14:24:12 +02:00

25 lines
773 B
Bash

#!/bin/sh
# Check if USERNAME and PASSWORD environment variables are defined
if [ -n "$USERNAME" ] && [ -n "$PASSWORD" ]; then
# Generate auth.txt file content from environment variables
echo -n "$USERNAME:$PASSWORD" > /auth.txt
echo "Authentication file generated from environment variables"
else
echo "USERNAME and/or PASSWORD variables not defined"
echo "Authentication will be managed by the onboarding system via the web interface"
fi
# Set database directory permissions
if [ -d "/github-ntfy" ]; then
chmod -R 755 /github-ntfy
echo "Permissions applied to data directory"
fi
# Start nginx in the background
echo "Starting Nginx..."
nginx -g 'daemon off;' &
# Start the main application
echo "Starting application..."
exec /usr/local/bin/github-ntfy