- This repository consists of 3 services namely
web,serverandmodel. - So, commit code to the corresponding services.
-
Fork the repo to your account.
-
Clone your forked repo to your local machine:
git clone https://github.com/NBNARADHYA/covid-vaccine-distribution.git (https)
or
git clone git@github.com:NBNARADHYA/covid-vaccine-distribution.git (ssh)
This will make a copy of the code to your local machine.
- Change directory to
covid-vaccine-distribution.
cd covid-vaccine-distribution
- Check the remote of your local repo by:
git remote -v
It should output the following:
origin https://github.com/<username>/covid-vaccine-distribution.git (fetch)
origin https://github.com/<username>/covid-vaccine-distribution.git (push)
or
origin git@github.com:<username>/covid-vaccine-distribution.git (fetch)
origin git@github.com:<username>/covid-vaccine-distribution.git (push)
Add upstream to remote:
git remote add upstream https://github.com/NBNARADHYA/covid-vaccine-distribution.git (https)
or
git remote add upstream git@github.com:NBNARADHYA/covid-vaccine-distribution.git (ssh)
Running git remote -v should then print the following:
origin https://github.com/<username>/covid-vaccine-distribution.git (fetch)
origin https://github.com/<username>/covid-vaccine-distribution.git (push)
upstream https://github.com/NBNARADHYA/covid-vaccine-distribution.git (fetch)
upstream https://github.com/NBNARADHYA/covid-vaccine-distribution.git (push)
or
origin git@github.com:<username>/covid-vaccine-distribution.git (fetch)
origin git@github.com:<username>/covid-vaccine-distribution.git (push)
upstream git@github.com:NBNARADHYA/covid-vaccine-distribution.git (fetch)
upstream git@github.com:NBNARADHYA/covid-vaccine-distribution.git (push)
- Make sure you are in the root of the project (i.e.,
./covid-vaccine-distribution/folder). - Setup environement variables in
.envfiles of allservicesandrootaccording to.example.envfiles. - Run
docker-compose upto spin up the containers. - The website would then be available locally at
http://localhost:WEB_PORT/. (WEB_PORTin.env) - The above command could be run in detached mode with
-dflag asdocker-compose up -d. - For help, run the command
docker-compose -h.
- Install
postgresqlby looking up the following docs (debian based linux, mac os and windows) - Create a new user by running
createuser -U postgres -P techathon - Create a new database by running
createdb -U postgres -O techathon techathon
- Run
cd services/server - Setup environmental variables according to
.example.env - Run
yarn install - Run
yarn run devto start the server
- Run
cd services/web - Setup environmental variables according to
.example.env - Run
yarn install - Run
yarn startto start the server
- Install
python3on your device if not already by looking up the following docs(windows, mac,ubuntucomes pre-installed) - Install
virtualenvif not already by runningpip3 install virtualenv
- Run
cd services/model - Run
python3 -m venv venvto create a virtual environment - Activate
venvby running. venv/bin/activate - Run
pip3 install -r requirements.txtto install packages

