Files
lidify/frontend/docker-entrypoint.sh
2025-12-25 18:58:06 -06:00

31 lines
1.5 KiB
Bash

#!/bin/sh
set -e
# Security check: Refuse to run as root
if [ "$(id -u)" = "0" ]; then
echo ""
echo "╔══════════════════════════════════════════════════════════════╗"
echo "║ FATAL: CANNOT START AS ROOT ║"
echo "║ ║"
echo "║ Running as root is a security risk. This container must ║"
echo "║ run as a non-privileged user. ║"
echo "║ ║"
echo "║ Do NOT use: ║"
echo "║ - docker run --user root ║"
echo "║ - user: root in docker-compose.yml ║"
echo "║ ║"
echo "║ The container is configured to run as 'nextjs' user. ║"
echo "╚══════════════════════════════════════════════════════════════╝"
echo ""
exit 1
fi
echo "[START] Starting Lidify Frontend..."
echo "[CONFIG] Environment: ${NODE_ENV:-production}"
echo "[CONFIG] API URL: ${NEXT_PUBLIC_API_URL:-not set}"
# Execute the main command
exec "$@"