mirror of
https://github.com/rommapp/romm.git
synced 2026-02-18 00:27:41 +01:00
32 lines
764 B
Bash
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
|