You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here you have Global variables directly on the class file, I would suggest to include it as global variables in your container, and extract them using something like https://pypi.org/project/python-dotenv/
Regarding the DB, you can do the same that you did here db_pass = os.getenv("MYSQL_PASSWORD") for all of the variables, then you just need to configure your container without changing code. It makes easier to deploy and maintain the application.
Here you have Global variables directly on the class file, I would suggest to include it as global variables in your container, and extract them using something like https://pypi.org/project/python-dotenv/
PATH_TO_KEYS = "/app/spotiplot.env"
DEBUG_STATE = False
LOOP_SLEEP = 3
Regarding the DB, you can do the same that you did here db_pass = os.getenv("MYSQL_PASSWORD") for all of the variables, then you just need to configure your container without changing code. It makes easier to deploy and maintain the application.
db_config = {
"user": "os.getenv("MYSQL_USER")",
"password": db_pass,
"host": "os.getenv("MYSQL_HOST")",
"port": os.getenv("MYSQL_PORT"),
"database": "os.getenv("MYSQL_DATABASE")",
}
The text was updated successfully, but these errors were encountered: