docker stuff almost complete
This commit is contained in:
@@ -10,6 +10,7 @@ from core.config import ConfSettings
|
||||
|
||||
Base = declarative_base()
|
||||
|
||||
#settings = ConfSettings()
|
||||
|
||||
class MetricModel(Base):
|
||||
"""Modelo SQLAlchemy para métricas en Postgres"""
|
||||
@@ -28,7 +29,7 @@ class MetricsRepositoryPostgres(MetricsRepository):
|
||||
"""Implementación de repositorio de métricas con PostgreSQL"""
|
||||
|
||||
def __init__(self):
|
||||
db_url = f"postgresql://voxpopuli:voxpopuli_pass@localhost:5432/voxpopuli_metrics"
|
||||
db_url = f"postgresql://voxpopuli:voxpopuli_pass@postgres:5432/voxpopuli_metrics"
|
||||
self.engine = create_engine(db_url, echo=False)
|
||||
Base.metadata.create_all(self.engine)
|
||||
self.SessionLocal = sessionmaker(bind=self.engine)
|
||||
|
||||
Reference in New Issue
Block a user