Add env variables support
This commit is contained in:
@@ -6,7 +6,7 @@ import json
|
||||
|
||||
# Constants
|
||||
|
||||
NTFY_TOKEN = os.getenv("NTFY_TOKEN") or "tk_cdmwd6ix255g3qgo4dx3r0gakw4y3"
|
||||
NTFY_TOKEN = os.getenv("NTFY_TOKEN")
|
||||
|
||||
|
||||
def fetch_ntfy_notifications(base_url, subscriptions):
|
||||
|
||||
@@ -3,9 +3,10 @@ from sqlalchemy.ext.declarative import declarative_base
|
||||
from sqlalchemy.orm import sessionmaker
|
||||
from sqlalchemy.sql.functions import func
|
||||
from sqlalchemy.sql.sqltypes import DateTime
|
||||
import os
|
||||
|
||||
# Initialize the database
|
||||
DATABASE_URL = "sqlite:///./project_monitor.db"
|
||||
DATABASE_URL = os.getenv("DATABASE_URL", "sqlite:///./project_monitor.db")
|
||||
|
||||
# SQLAlchemy setup
|
||||
engine = create_engine(DATABASE_URL, connect_args={"check_same_thread": False})
|
||||
|
||||
Reference in New Issue
Block a user