fix(crawler): update env and database config
Updated crawler configuration and database connection handling. Added .gitignore to exclude pycache and .env file.
This commit is contained in:
2
.env
2
.env
@@ -1 +1 @@
|
||||
DATABASE_URL=postgres://postgres:password@192.168.1.204:5432/fuelprices
|
||||
DATABASE_URL=postgresql://postgres:password@192.168.1.204:5432/fuelprices
|
||||
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
__pycache__/
|
||||
*.pyc
|
||||
.env
|
||||
@@ -5,7 +5,7 @@ from sqlalchemy.orm import sessionmaker
|
||||
from sqlalchemy.ext.declarative import declarative_base
|
||||
|
||||
# --- Database Configuration ---
|
||||
DATABASE_URL = "postgresql://postgres:password@192.168.1.204:5432/fuelprices"
|
||||
DATABASE_URL = os.getenv("DATABASE_URL", "postgresql://postgres:password@192.168.1.204:5432/fuelprices")
|
||||
# Ensure this DATABASE_URL is correct for your setup (e.g., 'db' for Docker Compose,
|
||||
# 'host.docker.internal' or an IP for external DBs)
|
||||
# For your error, it seems you are trying to connect to 192.164.1.204
|
||||
|
||||
Reference in New Issue
Block a user