Repository for a tool that will help tracking the Covid-19 spread in the school
To develop you'll have 2 options: use docker or use your own virtual environment, both are ok. After cloning your repo, follow the steps bellow.
You have to make sure you have already set your SSH keys for your github account. After that you can start cloning your repository.
git clone [email protected]:Anahuac-Queretaro/Covid-Tracker.git
# Build the services
docker compose build
# lift the containers
docker compose up -d
And done, you will have running django on 127.0.0.1:8000
To run django and python commands you'll have to enter the containers like this:
# Enter sh shell
docker compose exec app sh
This will open you the "sh" shell on the container and you will be able to run your python commands like this:
# Running migrations example
python manage.py migrate
If you prefer, you can use your own virtual environment, just make sure the version of python you are running is 3.7 to avoid conflicts with your peers.
To create a virtual env you can do it as follows:
# Create virtual env and choose the name of the folder where it will live.
# e.g. "python3 -m venv .env"
python3 -m venv [.env|env|.venv|env|ENV]
# Activate virtual env
# e.g. "source ./.env/bin/activate"
source ./[name of folder]/bin/activate
pip install -r requirements.txt
Before running the application you will need a .env file with your local variables. You can copy the contents of .env.example.
# Enter django app folder
cd app
# Create .env file
cp .env.example .env
Ask your administrator for SECRET_KEY value.
Django works with migrations for database control, so you'll need to run them.
python manage.py migrate
python manage.py runserver 0.0.0.0:8000