#
# Copyright (c) 2021, Patrik Brosz
#

echo -e "\n--- Running Django ---\n"
cd /srv/backend
pipenv install >> /vagrant/vm_build.log 2>&1
pipenv run python manage.py migrate >> /vagrant/vm_build.log 2>&1
pipenv run python manage.py makemigrations >> /vagrant/vm_build.log 2>&1
pipenv run python manage.py migrate >> /vagrant/vm_build.log 2>&1
pipenv run python manage.py runserver 0.0.0.0:8000 &

echo -e "\n--- Running React ---\n"
cd /srv/frontend/
serve -s build &