mirror of
https://github.com/kbenestad/ClubLedger.git
synced 2026-06-18 09:44:33 +00:00
Add run.sh to handle venv setup automatically
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
This commit is contained in:
parent
a5c9af1ca6
commit
8fa3aca85d
1 changed files with 15 additions and 0 deletions
15
run.sh
Normal file
15
run.sh
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
#!/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 "$@"
|
||||
Loading…
Reference in a new issue