Fakultas Ilmu Komputer UI

Skip to content
Snippets Groups Projects

Mobile Apps Monitoring Wabah Tuberkulosis - TBCare

Overview

This repository contains codebase for TBCare backend system

Environment Variables

# You can adjust the values with your Postgres instance credentials.
DATABASE_NAME=postgres
DATABASE_HOST=localhost
DATABASE_PORT=5432
DATABASE_USER=postgres
DATABASE_PASSWORD=postgres

# Whether to use PostgreSQL or SQLite3
DATABASE_IS_PSQL=True

# Debug setting. Set it to False on production.
DEBUG=True

# Specific to docker-compose
PORT=8000
ENVIRONMENT=development

# Email
EMAIL_HOST = os.environ.get("EMAIL_HOST")
EMAIL_HOST_USER = os.environ.get("EMAIL_HOST_USER")
EMAIL_HOST_PASSWORD = os.environ.get("EMAIL_HOST_PASSWORD")
EMAIL_PORT = os.environ.get("EMAIL_PORT")
EMAIL_USE_TLS = os.environ.get("EMAIL_USE_TLS")

How to Run

  1. Run an instance of PostgreSQL database. Then set the credentials on a .env file at the root directory. For example you can spin a Docker container to run a Postgres DB instance:
docker run -p 5432:5432 -d postgres
  1. Prepare and activate a Python virtual environment
virtualenv env
source env/bin/activate
  1. Install required packages
pip install -r requirements.txt
  1. Do database migrations
python manage.py migrate
  1. Run
python manage.py runserver

Using docker-compose

Use existing image

docker-compose up -d

Tech Stack

  • Django Rest Framework
  • PostgreSQL RDBMS
  • Docker (with compose)

Team Members

  • Dave Nathanael
  • Irwanto
  • Jonathan Christopher J
  • Josh Sudung
  • Nandhika Prayoga