Compare commits
3 Commits
95a232fb78
...
1.0.0
| Author | SHA1 | Date | |
|---|---|---|---|
| a910bffcc9 | |||
| 06e24e35e1 | |||
| 523ac2228d |
@ -8,8 +8,8 @@ services:
|
|||||||
DB_NAME: postgres
|
DB_NAME: postgres
|
||||||
POSTGRES_USER: postgres
|
POSTGRES_USER: postgres
|
||||||
POSTGRES_PASSWORD: postgres
|
POSTGRES_PASSWORD: postgres
|
||||||
HOST_NAME: "localhost"
|
HOST_NAME: postgres
|
||||||
PG_PORT: "8000"
|
PG_PORT: 5432
|
||||||
LOGGING_LEVEL: "INFO"
|
LOGGING_LEVEL: "INFO"
|
||||||
ENABLE_API_DOCS: "True"
|
ENABLE_API_DOCS: "True"
|
||||||
UVI_LOGGING_LEVEL: "info"
|
UVI_LOGGING_LEVEL: "info"
|
||||||
@ -27,7 +27,7 @@ services:
|
|||||||
POSTGRES_USER: postgres
|
POSTGRES_USER: postgres
|
||||||
POSTGRES_PASSWORD: postgres
|
POSTGRES_PASSWORD: postgres
|
||||||
ports:
|
ports:
|
||||||
- "4001:5432"
|
- :5432
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "pg_isready", "-U", "postgres"]
|
test: ["CMD", "pg_isready", "-U", "postgres"]
|
||||||
interval: 5s
|
interval: 5s
|
||||||
|
|||||||
@ -17,6 +17,7 @@ def set_connection():
|
|||||||
logger.info('Connection to PostreSQL DB set successfully')
|
logger.info('Connection to PostreSQL DB set successfully')
|
||||||
except psycopg2.Error as e:
|
except psycopg2.Error as e:
|
||||||
logger.error(f'Failed to set connection to the PostgreSQL DB: {e.pgerror}')
|
logger.error(f'Failed to set connection to the PostgreSQL DB: {e.pgerror}')
|
||||||
|
exit()
|
||||||
|
|
||||||
|
|
||||||
def close_connection(connection):
|
def close_connection(connection):
|
||||||
|
|||||||
@ -5,4 +5,4 @@ from app_creator import create_app
|
|||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
app = create_app()
|
app = create_app()
|
||||||
uvicorn.run(app=app, host="127.0.0.1", port=8000, log_level=uvicorn_logging_level.lower())
|
uvicorn.run(app=app, host="0.0.0.0", port=8000, log_level=uvicorn_logging_level.lower())
|
||||||
|
|||||||
Reference in New Issue
Block a user