- This repository consists of 3 services namely
web
,server
andmodel
. - 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 [email protected]: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 [email protected]:<username>/covid-vaccine-distribution.git (fetch)
origin [email protected]:<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 [email protected]: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 [email protected]:<username>/covid-vaccine-distribution.git (fetch)
origin [email protected]:<username>/covid-vaccine-distribution.git (push)
upstream [email protected]:NBNARADHYA/covid-vaccine-distribution.git (fetch)
upstream [email protected]: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
.env
files of allservices
androot
according to.example.env
files. - Run
docker-compose up
to spin up the containers. - The website would then be available locally at
http://localhost:WEB_PORT/
. (WEB_PORT
in.env
) - The above command could be run in detached mode with
-d
flag asdocker-compose up -d
. - For help, run the command
docker-compose -h
.
- Install
postgresql
by 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 dev
to start the server
- Run
cd services/web
- Setup environmental variables according to
.example.env
- Run
yarn install
- Run
yarn start
to start the server
- Install
python3
on your device if not already by looking up the following docs(windows, mac,ubuntu
comes pre-installed) - Install
virtualenv
if not already by runningpip3 install virtualenv
- Run
cd services/model
- Run
python3 -m venv venv
to create a virtual environment - Activate
venv
by running. venv/bin/activate
- Run
pip3 install -r requirements.txt
to install packages