fix: config postgres + create admin

This commit is contained in:
safouane-bazzi
2026-04-16 22:01:32 +02:00
parent 06597bd9d3
commit 81c7eb6730
3 changed files with 7 additions and 8 deletions

2
.gitignore vendored
View File

@@ -16,4 +16,4 @@ __pycache__/
*.log
# Docker
*.db
*.dbvenv/

View File

@@ -1,10 +1,9 @@
import os
class Config:
# S'il trouve la variable Docker, il l'utilise. Sinon, il met "localhost" par défaut.
DB_HOST = os.environ.get("DB_HOST", "localhost")
DB_PORT = os.environ.get("DB_PORT", "5432")
DB_PORT = os.environ.get("DB_PORT", "5433")
DB_NAME = os.environ.get("DB_NAME", "ecocharge")
DB_USER = os.environ.get("DB_USER", "ecocharge_user")
DB_PASSWORD = os.environ.get("DB_PASSWORD", "ecocharge_password")
DB_USER = os.environ.get("DB_USER", "postgres")
DB_PASSWORD = os.environ.get("DB_PASSWORD", "Safouane2005#")
SECRET_KEY = os.environ.get("SECRET_KEY", "cle_par_defaut")

View File

@@ -2,10 +2,10 @@ import psycopg2
from werkzeug.security import generate_password_hash
DB_HOST = "localhost"
DB_PORT = "5432"
DB_PORT = "5433"
DB_NAME = "ecocharge"
DB_USER = "ecocharge_user"
DB_PASSWORD = "ecocharge_password"
DB_USER = "postgres"
DB_PASSWORD = "Safouane2005#"
USERNAME = "admin"
PLAIN_PASSWORD = "admin123"