mirror of
https://github.com/workhardbekind/workout-challenge.git
synced 2026-07-04 09:23:32 -04:00
first commit
This commit is contained in:
commit
e7f627801f
152 changed files with 35352 additions and 0 deletions
8
scripts/dev_clean_db.sh
Normal file
8
scripts/dev_clean_db.sh
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#!/bin/sh
|
||||
cd '../src-backend'
|
||||
redis-cli flushall || echo "Redis Cache could not be flushed"
|
||||
find . -path "./*/migrations/*.py" -not -name "__init__.py" -delete
|
||||
find . -path "./data/db_migrations/*" -delete
|
||||
find /opt/miniconda3/envs/pydev/ -path "*/site-packages/migrations/*.py" -not -name "__init__.py" -delete
|
||||
find /opt/miniconda3/envs/pydev/ -path "*/site-packages/django/contrib/*/migrations/*.py" -not -name "__init__.py" -delete
|
||||
find . | grep -E "(__pycache__|\.pyc|\.pyo|\.sqlite3)" | xargs rm -rf
|
||||
5
scripts/dev_setup_db.sh
Normal file
5
scripts/dev_setup_db.sh
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
cd '../src-backend'
|
||||
python manage.py makemigrations
|
||||
python manage.py migrate
|
||||
python manage.py add_dummy_data
|
||||
20
scripts/launch_django.sh
Normal file
20
scripts/launch_django.sh
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Working dir is "src-backend"
|
||||
|
||||
export DJANGO_SETTINGS_MODULE="workout_challenge.settings"
|
||||
|
||||
echo "Run make migrations"
|
||||
python manage.py makemigrations
|
||||
|
||||
echo "Run migrate"
|
||||
python manage.py migrate
|
||||
|
||||
if [ $DEBUG == "true" ] || [ $DEBUG == "True" ]; then
|
||||
echo "Run Django Server";
|
||||
python ./manage.py runserver 0.0.0.0:8000;
|
||||
else
|
||||
echo "Run Gunicorn Server";
|
||||
python manage.py collectstatic --noinput;
|
||||
gunicorn -c ./gunicorn.conf.py;
|
||||
fi
|
||||
12
scripts/launch_react.sh
Normal file
12
scripts/launch_react.sh
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Working dir is "src-frontend"
|
||||
|
||||
if [ $DEBUG == "true" ] || [ $DEBUG == "True" ]; then
|
||||
echo "Run React Dev-Server";
|
||||
npm start;
|
||||
else
|
||||
echo "Run React Prod-Server";
|
||||
npm run build;
|
||||
serve -s build -l 3000;
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue