fix: env files and logo
Local Docker Build (Dev) / build-dev (push) Successful in 1m43s

This commit is contained in:
2025-10-22 13:01:52 -04:00
parent 9b03fb50ea
commit 0580eb68f9
3 changed files with 27 additions and 12 deletions
+7
View File
@@ -23,6 +23,9 @@ DOWNLOAD_PATH_INDICATORS=/downloads/,/nzbget/,/completed/,/sabnzbd/,/torrents/
# ===========================================
# SERVER CONFIGURATION
# ===========================================
# Timezone for container logging and timestamps
TZ=America/New_York
# NFOGuard Core API (webhooks, processing, database management)
CORE_API_HOST=0.0.0.0
CORE_API_PORT=8080
@@ -31,6 +34,9 @@ CORE_API_PORT=8080
WEB_API_HOST=0.0.0.0
WEB_API_PORT=8081
# External port where web interface is accessible (for dynamic port reference)
WEB_EXTERNAL_PORT=8081
# ===========================================
# DATABASE CONFIGURATION
# ===========================================
@@ -45,6 +51,7 @@ DB_TYPE=postgresql
DB_HOST=nfoguard-db # Container name from docker-compose
DB_PORT=5432
DB_NAME=nfoguard
DB_USER=nfoguard
# Legacy SQLite Configuration (Deprecated in v2.6+)
# Only use for existing SQLite installations
+11 -12
View File
@@ -16,11 +16,14 @@ services:
image: postgres:15-alpine
container_name: nfoguard-db
restart: unless-stopped
env_file:
- .env
- .env.secrets
environment:
- POSTGRES_DB=${DB_NAME:-nfoguard}
- POSTGRES_USER=${DB_USER:-nfoguard}
- POSTGRES_PASSWORD=${DB_PASSWORD:-}
- TZ=${TZ:-America/New_York}
- POSTGRES_DB=${DB_NAME}
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASSWORD}
- TZ=${TZ}
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
@@ -35,17 +38,15 @@ services:
# NFOGuard Core (Processing Engine)
nfoguard:
image: gitea.skalas.org/sbcrumb/nfoguard:latest
image: sbcrumb/nfoguard:latest
container_name: nfoguard-core
restart: unless-stopped
env_file:
- .env
- .env.secrets
environment:
- TZ=${TZ:-America/New_York}
- CORE_API_HOST=0.0.0.0
- CORE_API_PORT=8080
- WEB_EXTERNAL_PORT=${WEB_API_PORT:-8081} # External port where web interface is accessible
- TZ=${TZ}
- WEB_EXTERNAL_PORT=${WEB_EXTERNAL_PORT}
volumes:
# Media paths (adjust to your setup)
- /mnt/unionfs/Media/TV:/media/TV:ro
@@ -70,7 +71,7 @@ services:
# NFOGuard Web Interface
nfoguard-web:
image: gitea.skalas.org/sbcrumb/nfoguard:latest # Same image as core!
image: sbcrumb/nfoguard:latest # Same image as core!
container_name: nfoguard-web
restart: unless-stopped
command: ["python", "start_web.py"] # Different entry point
@@ -79,8 +80,6 @@ services:
- .env.secrets
environment:
- TZ=${TZ:-America/New_York}
- WEB_HOST=0.0.0.0
- WEB_PORT=8081
ports:
- "${WEB_API_PORT:-8081}:8081" # Web Interface
depends_on:
+9
View File
@@ -38,11 +38,20 @@ def setup_static_files(app: FastAPI) -> None:
static_path = os.path.join(os.path.dirname(__file__), "nfoguard-web", "static")
logo_path = os.path.join(os.path.dirname(__file__), "logo")
print(f"🔍 Checking static path: {static_path} (exists: {os.path.exists(static_path)})")
print(f"🔍 Checking logo path: {logo_path} (exists: {os.path.exists(logo_path)})")
if os.path.exists(static_path):
app.mount("/static", StaticFiles(directory=static_path), name="static")
print(f"✅ Mounted static files from: {static_path}")
else:
print(f"❌ Static path not found: {static_path}")
if os.path.exists(logo_path):
app.mount("/logo", StaticFiles(directory=logo_path), name="logo")
print(f"✅ Mounted logo files from: {logo_path}")
else:
print(f"❌ Logo path not found: {logo_path}")
# Serve index.html at root
@app.get("/")