From 37450b264edcf0c63d5fb545237d8d09c70d5a1a Mon Sep 17 00:00:00 2001 From: odinjv <odinjv@stud.ntnu.no> Date: Tue, 31 May 2022 23:15:38 +0200 Subject: [PATCH] Add Heroku instructions to README --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 5b7ca3b..1443c16 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,18 @@ recommend setting up a virtual environment, using e.g. Python's `venv` module: * Install the required packages: `pip install -r requirements.txt` * Apply database migrations: `python manage.py migrate` * Optionally populate the database: `python manage.py populatedefaults` `python manage.py populatesamples` + * or `python manage.py loadcsvdata test_data/[data folder]` * Run the application: `python manage.py runserver` * This will make the application available on port 8000; visit it by going to https://localhost:8000/ in your browser. * Deactivate the virtual environment when you are done: `deactivate` + +## Heroku Deployment (for test administration) +* Install the Heroku CLI +* Open bash from the local repository root folder +* Run `heroku login` and log in +* Run `heroku create pasapp` to create a heroku app on your account +* Run `git push heroku [local branchname]:main` to push and deploy the app +* Run `heroku ps:scale web=1` to allocate one web server to the app +* Run `heroku run bash` to open a bash on the live server + * `python manage.py loadcsvdata test_data/[data folder]` to populate the server -- GitLab