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
- 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
- Prepare and activate a Python virtual environment
virtualenv env
source env/bin/activate
- Install required packages
pip install -r requirements.txt
- Do database migrations
python manage.py migrate
- 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