DineLine

Main

gcivil-nyu-org Coverage Status Code style: black pre-commit

Team-1

gcivil-nyu-org Coverage Status

Team-2

gcivil-nyu-org Coverage Status

A dine-in app that leverages daily COVID-19 data to provide updated compliance status and hot spot notifications for reopened NYC restaurants.

https://dineline.herokuapp.com/

1. How to set up local environment

1) Clone the repo into local environment

Use git clone with the repo's link

2) Create an virtual environment of Python to work on this project

replace name_of_venv with the name you wanted for the virtual environment

python3 -m venv name_of_venv

3) Activate the venv and install the required libraries for this project

# Activate the virtual environment
source name_of_venv/bin/activate

# Install required libraries
pip install -r requirements.txt

4) Create a .env file to store all the related keys

For security issues, all the keys for this project are separately stored in environmental variables and loaded during running time. Thus, in order to deploy and build locally, creating a .env file and set up all the keys is mandatory.

All the related key_names can be found in dinesafelysite/settings.py with a format of

XXX_KEY = os.environ.get("XXX_KEY")

To set up corresponding key in .env, simply add the key in this format:

XXX_KEY="ABCDEFGHIJKLMNOPQRSTUVWXYZ"

5) Initialize Data

For the first time deployment, to update the data model and initialize that database, use this command:

bash release-tasks.sh

All the commands that are run by this script can be viewed in release-tasks.sh

6) Create local superuser

python manage.py createsuperuser

7) Collect static files

python manage.py collectstatic

8) Run server

python manage.py runserver

Congratulations! Initial local deployment is all set and now you can visit the default url of this project to see the webpage.