wip
This commit is contained in:
parent
eac9d2f510
commit
105c18ba14
4 changed files with 17 additions and 22 deletions
10
app.py
10
app.py
|
@ -11,10 +11,10 @@ from dotenv import load_dotenv
|
|||
# Load environment variables
|
||||
load_dotenv()
|
||||
|
||||
# Configuration
|
||||
# Configuration with fixed Caddyfile path
|
||||
API_KEY = os.getenv('API_KEY')
|
||||
DEBUG_MODE = os.getenv('DEBUG_MODE', 'false').lower() == 'true'
|
||||
CADDYFILE_PATH = os.getenv('CADDYFILE_PATH') # No default - if not set, we don't use local file
|
||||
CADDYFILE_PATH = "/app/Caddyfile" # Fixed internal path
|
||||
|
||||
# Setup logging
|
||||
logging.basicConfig(
|
||||
|
@ -24,10 +24,10 @@ logging.basicConfig(
|
|||
logger = logging.getLogger('caddy-dashboard')
|
||||
|
||||
# Determine if we should use local Caddyfile reading
|
||||
USE_LOCAL_CADDYFILE = CADDYFILE_PATH and os.path.exists(CADDYFILE_PATH)
|
||||
USE_LOCAL_CADDYFILE = os.path.exists(CADDYFILE_PATH)
|
||||
|
||||
if CADDYFILE_PATH and not USE_LOCAL_CADDYFILE:
|
||||
logger.warning(f"CADDYFILE_PATH is set but file not found at: {CADDYFILE_PATH}")
|
||||
if not USE_LOCAL_CADDYFILE:
|
||||
logger.warning(f"Caddyfile not found at the standard path: {CADDYFILE_PATH}")
|
||||
|
||||
if not API_KEY:
|
||||
logger.warning("API_KEY not set - running without authentication! This is insecure.")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue