Skip to content

Binzinz/BSP3

 
 

Repository files navigation

This project contains a website created with Django 3.1.1, Python 3.7, HTML 5 and CSS combined with the library Bootstrap 4. It is managed by gunicorn.

Installation (not required as already installed on the server)

Using the package manager pip:

Upgrade pip and install all the requirements:

pip3 install --upgrade pip
pip3 install --no-cache-dir -r requirements.txt

The project uses the database PostgreSQL which has to be downloaded here in order to create a database for the website (I would recommand to download the Postgres App).

To update the webserver code

  1. Connect to the machine in a Terminal
ssh -i "goodness-groceries.pem" [email protected]
  1. Pull changes from the github repository
cd ~/git/BSP3
git pull
  1. Migrations commands
python3 manage.py makemigrations
python3 manage.py migrate
  1. Restart unicorn
sudo systemctl restart gunicorn

Check the webserver status

Execute this command to check the webserver status

sudo systemctl status gunicorn

Usage to run on a local machine (for test purpose-only)

To run the website on your local machine:

  • Open the Postgres App and create a server and a database
  • Open the project and go to the directory "GoodnessGroceries_Project" in the main folder
  • Open the python file "settings.py" and scroll down to "DATABASES", there you have to change the settings such that it corresponds to your created database
  • Open the terminal and go to the folder where the project is located (the "manage.py" file should be located in this folder)
  • Being in this folder in the terminal, run the command python3 manage.py runserver (The database server has to be running)
  • The server is now running on your local host, to access the website go to some browser (Chrome was used for developping) and go to http://localhost:8000/, this will redirect you to your local host with the port 8000 where the website is running

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 38.4%
  • Python 23.5%
  • HTML 19.1%
  • CSS 19.0%