Have python (at least version 3.8), pipenv and docker installed on your system. If you do not have pipenv installed you can do so by running
pip install pipenv
Although this project uses a postgres database, postgres is not required to be installed. The database is setup in a docker container.
This is how to use automatic installation using bash scripts. At the end of this readme there also is a manual instruction in case you run into errors.
Open the root directory of this project in your terminal. Then type the following commands:
cd "bash scripts"
install.sh
Wait until the installation is finished. If on your operating system a new bash window is automatically opened that runs the commands, the installation is finished once it disappears again.
cd "bash scripts"
startServer.sh
There is no console output confirming that the webserver was created. Do not close the terminal window. Just wait a few seconds and then open http://127.0.0.1:8000/
in your browser. You should now see the home screen of the website.
IF THIS STEP DOES NOT WORK FOR YOU: Go to the manual installation instruction and manually run the last three code snippets
The database and the virtual environment including its installed python packages will be completely removed from your system.
cd "bash scripts"
uninstall.sh
https://dbdiagram.io/d/62610fed1072ae0b6ac1b018
Open the root directory of this repository in your terminal. Type the following commands in your terminal.
- Create the database server
cd src && docker-compose up
- Create a virtual python environment and install the packages from the Pipfile
cd .. && pipenv install
- Run the virtual environment
pipenv shell
- You are now running your commands inside the virtual environment. Go to the directory where the manage.py file ist stored
cd src
- Run the Django webserver
python manage.py runserver
The webserver for Django is now running.
Click on the given http link with CTRL+Click and the website should open in your browser.
Run the following commands in the root folder of this project:
- Delete the database server
docker-compose down
- Remove the virtual environment
pipenv --rm