Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding startup script #119

Merged
merged 2 commits into from
Aug 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions run_server
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/sh
cd travit_service

# virtual env setup

if [ -d venv ]; then
echo 'Deleting existing Python3 virtual environment'
rm -r virtualenv
else
echo 'No Python3 virtual environment was detected. Creating a new environment'
python3 -m venv virtualenv
echo 'Activating new environment'
. virtualenv/bin/activate
fi

# Install requirements
pip install -r requirements.txt

# Run migrations
python3 manage.py makemigrations && python3 manage.py migrate

# Start server
python3 manage.py runserver