Files
romm/entrypoint.sh
Georges-Antoine Assi e8f8f1621c complete migration to uv
2025-07-04 09:54:04 -04:00

32 lines
764 B
Bash

#!/bin/bash
set -e
echo "Starting entrypoint script..."
# Create symlinks for frontend
mkdir -p /app/frontend/assets/romm
ln -sf /app/romm/resources /app/frontend/assets/romm/resources
ln -sf /app/romm/assets /app/frontend/assets/romm/assets
# Define a signal handler to propagate termination signals
function handle_termination() {
echo "Terminating child processes..."
# trunk-ignore(shellcheck)
kill -TERM $(jobs -p) 2>/dev/null
}
# Trap SIGTERM and SIGINT signals
trap handle_termination SIGTERM SIGINT
# Start all services in the background
cd /app/backend
uv run python main.py &
OBJC_DISABLE_INITIALIZE_FORK_SAFETY=1 uv run python worker.py &
# Start the frontend dev server
cd /app/frontend
npm run dev &
# Wait for all background processes
wait