From 470d77c28f3e093d6d245c1f7205c8421c106c52 Mon Sep 17 00:00:00 2001 From: SBCrumb Date: Wed, 22 Oct 2025 11:53:25 -0400 Subject: [PATCH] web: fix issues with entrypoint --- docker-compose.example.yml | 10 ++-------- start_web.py | 2 +- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/docker-compose.example.yml b/docker-compose.example.yml index cb19802..efa8e57 100644 --- a/docker-compose.example.yml +++ b/docker-compose.example.yml @@ -19,7 +19,7 @@ services: environment: - POSTGRES_DB=${DB_NAME:-nfoguard} - POSTGRES_USER=${DB_USER:-nfoguard} - - POSTGRES_PASSWORD=${DB_PASSWORD} + - POSTGRES_PASSWORD=${DB_PASSWORD:-} - TZ=${TZ:-America/New_York} volumes: - postgres_data:/var/lib/postgresql/data @@ -72,7 +72,7 @@ services: image: gitea.skalas.org/sbcrumb/nfoguard:latest # Same image as core! container_name: nfoguard-web restart: unless-stopped - command: ["python", "nfoguard-web/main_web.py"] # Different entry point + command: ["python", "start_web.py"] # Different entry point env_file: - .env - .env.secrets @@ -80,12 +80,6 @@ services: - TZ=${TZ:-America/New_York} - WEB_HOST=0.0.0.0 - WEB_PORT=8081 - - DB_HOST=nfoguard-db - - CORE_API_HOST=nfoguard - - CORE_API_PORT=8080 - - DB_NAME=${DB_NAME:-nfoguard} - - DB_USER=${DB_USER:-nfoguard} - - DB_PASSWORD=${DB_PASSWORD} ports: - "${WEB_API_PORT:-8081}:8081" # Web Interface depends_on: diff --git a/start_web.py b/start_web.py index 0829752..da87922 100644 --- a/start_web.py +++ b/start_web.py @@ -69,7 +69,7 @@ def main(): # Initialize database using existing system try: - db = NFOGuardDatabase() + db = NFOGuardDatabase(config) print(f"✅ Connected to database: {config.db_host}:{config.db_port}/{config.db_name}") except Exception as e: print(f"❌ Failed to connect to database: {e}")