diff --git a/scripts/backend/hard-install b/scripts/backend/hard-install new file mode 100644 index 00000000..eda5b2fc --- /dev/null +++ b/scripts/backend/hard-install @@ -0,0 +1,8 @@ +#!/bin/bash +set -e + +rm -f Pipfile.lock +shopt -s extglob +rm -rf .venv/!(".gitkeep") +shopt -u extglob +pipenv install --dev diff --git a/scripts/backend/run b/scripts/backend/run new file mode 100644 index 00000000..f60f3e7b --- /dev/null +++ b/scripts/backend/run @@ -0,0 +1,6 @@ +#!/bin/bash +set -e + +wget -O - https://raw.githubusercontent.com/ocadotechnology/codeforlife-workspace/main/scripts/backend/setup | bash + +pipenv run python manage.py runserver localhost:8000 diff --git a/scripts/backend/setup b/scripts/backend/setup new file mode 100644 index 00000000..65806c92 --- /dev/null +++ b/scripts/backend/setup @@ -0,0 +1,7 @@ +#!/bin/bash +set -e + +pipenv install --dev +pipenv run python manage.py migrate --noinput +pipenv run python manage.py load_fixtures api +pipenv run python manage.py collectstatic --noinput --clear diff --git a/scripts/frontend/hard-install b/scripts/frontend/hard-install new file mode 100644 index 00000000..8191494c --- /dev/null +++ b/scripts/frontend/hard-install @@ -0,0 +1,7 @@ +#!/bin/bash +set -e + +rm -f yarn.lock +rm -rf node_modules +yarn cache clean codeforlife +yarn install --production=false diff --git a/scripts/frontend/run b/scripts/frontend/run new file mode 100644 index 00000000..22994acd --- /dev/null +++ b/scripts/frontend/run @@ -0,0 +1,6 @@ +#!/bin/bash +set -e + +wget -O - https://raw.githubusercontent.com/ocadotechnology/codeforlife-workspace/main/scripts/frontend/setup | bash + +yarn dev diff --git a/scripts/frontend/setup b/scripts/frontend/setup new file mode 100644 index 00000000..94b55889 --- /dev/null +++ b/scripts/frontend/setup @@ -0,0 +1,4 @@ +#!/bin/bash +set -e + +yarn install --production=false