/web-backend

Backend Django server of Cogito website

Primary LanguagePython

Cogito-Website Backend

GitHub Django Workflow License: MIT

Backend for Cogito-NTNU The backend is running on an aws ec2 server. To actually update the backend you need access to it. If any changes are wished upon, contact Simon Sandvik Lee on Slack.

Caution: If you have a new feature you want to implement, do it on a branch!

Developed by sandviklee

Docker

For ease of use and version management control, we use Docker to keep track of our containers and virtual environments.

Our Project

Our project uses docker to run the PostgreSQL server (database) and the Django Server.

Quick Start

Prerequisites

Configuration

Create a .env file in the root directory of the project and add the following environment variables:

DJANGO_SECRET_KEY = 'YOUR_SECRET_KEY'
EMAIL_HOST_USER = "YOUR_EMAIL"
EMAIL_HOST_PASSWORD  = "YOUR_EMAIL_PASSWORD"

Optionally, you can add the following environment variables to customize the project:

DEBUG = True
LOG_LEVEL = 'DEBUG' # DEBUG, INFO, WARNING, ERROR, CRITICAL

Usage

To run the project, execute the following command in the root directory:

docker compose up --build

Once the project is running, you can access the Django admin panel at the admin page

To see the endpoint documentation, visit the OpenAPI/Swagger page

📖 Documentation