mirror of
https://github.com/kbenestad/ClubLedger.git
synced 2026-06-18 09:44:33 +00:00
Creates .venv on first run, installs dependencies, then starts the server. Subsequent runs skip straight to starting. Avoids externally-managed-environment errors on Debian/Ubuntu 12+. https://claude.ai/code/session_01JuRTR5Xjx8emQsyerBgGU7
15 lines
363 B
Bash
15 lines
363 B
Bash
#!/bin/bash
|
||
# Run ClubLedger – creates a virtualenv on first run, then starts the server.
|
||
set -e
|
||
|
||
VENV=".venv"
|
||
|
||
if [ ! -d "$VENV" ]; then
|
||
echo "Creating virtual environment..."
|
||
python3 -m venv "$VENV"
|
||
echo "Installing dependencies..."
|
||
"$VENV/bin/pip" install --quiet -r requirements.txt
|
||
echo "Done."
|
||
fi
|
||
|
||
exec "$VENV/bin/python" main.py "$@"
|