web: fix issues with entrypoint
This commit is contained in:
@@ -19,7 +19,7 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- POSTGRES_DB=${DB_NAME:-nfoguard}
|
- POSTGRES_DB=${DB_NAME:-nfoguard}
|
||||||
- POSTGRES_USER=${DB_USER:-nfoguard}
|
- POSTGRES_USER=${DB_USER:-nfoguard}
|
||||||
- POSTGRES_PASSWORD=${DB_PASSWORD}
|
- POSTGRES_PASSWORD=${DB_PASSWORD:-}
|
||||||
- TZ=${TZ:-America/New_York}
|
- TZ=${TZ:-America/New_York}
|
||||||
volumes:
|
volumes:
|
||||||
- postgres_data:/var/lib/postgresql/data
|
- postgres_data:/var/lib/postgresql/data
|
||||||
@@ -72,7 +72,7 @@ services:
|
|||||||
image: gitea.skalas.org/sbcrumb/nfoguard:latest # Same image as core!
|
image: gitea.skalas.org/sbcrumb/nfoguard:latest # Same image as core!
|
||||||
container_name: nfoguard-web
|
container_name: nfoguard-web
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
command: ["python", "nfoguard-web/main_web.py"] # Different entry point
|
command: ["python", "start_web.py"] # Different entry point
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
- .env.secrets
|
- .env.secrets
|
||||||
@@ -80,12 +80,6 @@ services:
|
|||||||
- TZ=${TZ:-America/New_York}
|
- TZ=${TZ:-America/New_York}
|
||||||
- WEB_HOST=0.0.0.0
|
- WEB_HOST=0.0.0.0
|
||||||
- WEB_PORT=8081
|
- 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:
|
ports:
|
||||||
- "${WEB_API_PORT:-8081}:8081" # Web Interface
|
- "${WEB_API_PORT:-8081}:8081" # Web Interface
|
||||||
depends_on:
|
depends_on:
|
||||||
|
|||||||
+1
-1
@@ -69,7 +69,7 @@ def main():
|
|||||||
|
|
||||||
# Initialize database using existing system
|
# Initialize database using existing system
|
||||||
try:
|
try:
|
||||||
db = NFOGuardDatabase()
|
db = NFOGuardDatabase(config)
|
||||||
print(f"✅ Connected to database: {config.db_host}:{config.db_port}/{config.db_name}")
|
print(f"✅ Connected to database: {config.db_host}:{config.db_port}/{config.db_name}")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"❌ Failed to connect to database: {e}")
|
print(f"❌ Failed to connect to database: {e}")
|
||||||
|
|||||||
Reference in New Issue
Block a user