This commit is contained in:
@@ -23,6 +23,9 @@ DOWNLOAD_PATH_INDICATORS=/downloads/,/nzbget/,/completed/,/sabnzbd/,/torrents/
|
|||||||
# ===========================================
|
# ===========================================
|
||||||
# SERVER CONFIGURATION
|
# SERVER CONFIGURATION
|
||||||
# ===========================================
|
# ===========================================
|
||||||
|
# Timezone for container logging and timestamps
|
||||||
|
TZ=America/New_York
|
||||||
|
|
||||||
# NFOGuard Core API (webhooks, processing, database management)
|
# NFOGuard Core API (webhooks, processing, database management)
|
||||||
CORE_API_HOST=0.0.0.0
|
CORE_API_HOST=0.0.0.0
|
||||||
CORE_API_PORT=8080
|
CORE_API_PORT=8080
|
||||||
@@ -31,6 +34,9 @@ CORE_API_PORT=8080
|
|||||||
WEB_API_HOST=0.0.0.0
|
WEB_API_HOST=0.0.0.0
|
||||||
WEB_API_PORT=8081
|
WEB_API_PORT=8081
|
||||||
|
|
||||||
|
# External port where web interface is accessible (for dynamic port reference)
|
||||||
|
WEB_EXTERNAL_PORT=8081
|
||||||
|
|
||||||
# ===========================================
|
# ===========================================
|
||||||
# DATABASE CONFIGURATION
|
# DATABASE CONFIGURATION
|
||||||
# ===========================================
|
# ===========================================
|
||||||
@@ -45,6 +51,7 @@ DB_TYPE=postgresql
|
|||||||
DB_HOST=nfoguard-db # Container name from docker-compose
|
DB_HOST=nfoguard-db # Container name from docker-compose
|
||||||
DB_PORT=5432
|
DB_PORT=5432
|
||||||
DB_NAME=nfoguard
|
DB_NAME=nfoguard
|
||||||
|
DB_USER=nfoguard
|
||||||
|
|
||||||
# Legacy SQLite Configuration (Deprecated in v2.6+)
|
# Legacy SQLite Configuration (Deprecated in v2.6+)
|
||||||
# Only use for existing SQLite installations
|
# Only use for existing SQLite installations
|
||||||
|
|||||||
+11
-12
@@ -16,11 +16,14 @@ services:
|
|||||||
image: postgres:15-alpine
|
image: postgres:15-alpine
|
||||||
container_name: nfoguard-db
|
container_name: nfoguard-db
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
|
- .env.secrets
|
||||||
environment:
|
environment:
|
||||||
- POSTGRES_DB=${DB_NAME:-nfoguard}
|
- POSTGRES_DB=${DB_NAME}
|
||||||
- POSTGRES_USER=${DB_USER:-nfoguard}
|
- POSTGRES_USER=${DB_USER}
|
||||||
- POSTGRES_PASSWORD=${DB_PASSWORD:-}
|
- POSTGRES_PASSWORD=${DB_PASSWORD}
|
||||||
- TZ=${TZ:-America/New_York}
|
- TZ=${TZ}
|
||||||
volumes:
|
volumes:
|
||||||
- postgres_data:/var/lib/postgresql/data
|
- postgres_data:/var/lib/postgresql/data
|
||||||
ports:
|
ports:
|
||||||
@@ -35,17 +38,15 @@ services:
|
|||||||
|
|
||||||
# NFOGuard Core (Processing Engine)
|
# NFOGuard Core (Processing Engine)
|
||||||
nfoguard:
|
nfoguard:
|
||||||
image: gitea.skalas.org/sbcrumb/nfoguard:latest
|
image: sbcrumb/nfoguard:latest
|
||||||
container_name: nfoguard-core
|
container_name: nfoguard-core
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
- .env.secrets
|
- .env.secrets
|
||||||
environment:
|
environment:
|
||||||
- TZ=${TZ:-America/New_York}
|
- TZ=${TZ}
|
||||||
- CORE_API_HOST=0.0.0.0
|
- WEB_EXTERNAL_PORT=${WEB_EXTERNAL_PORT}
|
||||||
- CORE_API_PORT=8080
|
|
||||||
- WEB_EXTERNAL_PORT=${WEB_API_PORT:-8081} # External port where web interface is accessible
|
|
||||||
volumes:
|
volumes:
|
||||||
# Media paths (adjust to your setup)
|
# Media paths (adjust to your setup)
|
||||||
- /mnt/unionfs/Media/TV:/media/TV:ro
|
- /mnt/unionfs/Media/TV:/media/TV:ro
|
||||||
@@ -70,7 +71,7 @@ services:
|
|||||||
|
|
||||||
# NFOGuard Web Interface
|
# NFOGuard Web Interface
|
||||||
nfoguard-web:
|
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
|
container_name: nfoguard-web
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
command: ["python", "start_web.py"] # Different entry point
|
command: ["python", "start_web.py"] # Different entry point
|
||||||
@@ -79,8 +80,6 @@ services:
|
|||||||
- .env.secrets
|
- .env.secrets
|
||||||
environment:
|
environment:
|
||||||
- TZ=${TZ:-America/New_York}
|
- TZ=${TZ:-America/New_York}
|
||||||
- WEB_HOST=0.0.0.0
|
|
||||||
- WEB_PORT=8081
|
|
||||||
ports:
|
ports:
|
||||||
- "${WEB_API_PORT:-8081}:8081" # Web Interface
|
- "${WEB_API_PORT:-8081}:8081" # Web Interface
|
||||||
depends_on:
|
depends_on:
|
||||||
|
|||||||
@@ -38,11 +38,20 @@ def setup_static_files(app: FastAPI) -> None:
|
|||||||
static_path = os.path.join(os.path.dirname(__file__), "nfoguard-web", "static")
|
static_path = os.path.join(os.path.dirname(__file__), "nfoguard-web", "static")
|
||||||
logo_path = os.path.join(os.path.dirname(__file__), "logo")
|
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):
|
if os.path.exists(static_path):
|
||||||
app.mount("/static", StaticFiles(directory=static_path), name="static")
|
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):
|
if os.path.exists(logo_path):
|
||||||
app.mount("/logo", StaticFiles(directory=logo_path), name="logo")
|
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
|
# Serve index.html at root
|
||||||
@app.get("/")
|
@app.get("/")
|
||||||
|
|||||||
Reference in New Issue
Block a user