Energy-Visualizer / mexer

Energy Visualizer (Summer 2024)
MIT License
0 stars 0 forks source link

Production Ready Checks #12

Closed kenny5033 closed 2 months ago

kenny5033 commented 3 months ago
kenny5033 commented 2 months ago

A secret key has been generated and is in use. It reaches the application via an environment variable.

We just need to make sure debug is False in settings.py before anything reaches main, a tag, or otherwise live-able commits.

kenny5033 commented 2 months ago

I made a small bash script to check for things like this that can be run before making a new live-able commit.

#!/bin/bash

RED="\033[31m"
GREEN="\033[32m"

if grep -q "DEBUG\s*=\s*True" ./eviz_site/eviz_site/settings.py; then
    printf "${RED}Debug is set to True in settings.py. Please set it to False.\n";
    exit;
fi

printf "${GREEN}All checks passed!\n"

This can be expanded to include anything else that needs to be checked.