diff --git a/Dockerfile b/Dockerfile index 5b599cb..d07e212 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,9 +15,12 @@ RUN pip install -r requirements.txt RUN mkdir -p output/csv output/plots output/models -ENV FLASK_APP=wsgi.py +# ENV FLASK_APP=wsgi.py + +ENV FLASK_APP=run.py ENV FLASK_RUN_HOST=0.0.0.0 EXPOSE 8000 -CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:8000", "wsgi:wsgi_app"] \ No newline at end of file +# CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:8000", "wsgi:wsgi_app"] +CMD ["uvicorn", "run:app", "--host", "0.0.0.0", "--port", "8000", "--reload"] \ No newline at end of file diff --git a/app.log b/app.log new file mode 100644 index 0000000..5c264fd --- /dev/null +++ b/app.log @@ -0,0 +1,31 @@ +2025-09-09 10:23:31,651 - INFO - generated new fontManager +2025-09-09 10:23:38,494 - INFO - Initializing pipeline... +2025-09-09 10:23:38,496 - INFO - [2025-09-09 10:23:38] Detecting salary... +2025-09-09 10:23:38,497 - INFO - Started autonomous salary detection loop. +2025-09-09 10:23:38,509 - INFO - Server running on hostname: 1c3f3ceb2429 +2025-09-09 10:23:38,511 - INFO - Server IP address: 172.25.0.2 +2025-09-09 10:23:38,523 - INFO - Server is accessible at: +2025-09-09 10:23:38,525 - INFO - - http://localhost:8000 +2025-09-09 10:23:38,527 - INFO - - http://127.0.0.1:8000 +2025-09-09 10:23:38,528 - INFO - - http://172.25.0.2:8000 +2025-09-09 10:23:38,529 - INFO - Pipeline initialized successfully +2025-09-09 10:23:41,368 - INFO - POST http://www.simbrellang.net:5000/autocall/analytic-salary-detect status: 200, response: { + "data": [], + "error": {}, + "message": "AutoCall Add Salary Successful", + "status": true, + "statusCode": 200 +} + +2025-09-09 10:23:41,369 - INFO - [2025-09-09 10:23:41] Salary detection complete +2025-09-09 10:25:41,371 - INFO - [2025-09-09 10:25:41] Detecting salary... +2025-09-09 10:25:42,098 - INFO - POST http://www.simbrellang.net:5000/autocall/analytic-salary-detect status: 200, response: { + "data": [], + "error": {}, + "message": "AutoCall Add Salary Successful", + "status": true, + "statusCode": 200 +} + +2025-09-09 10:25:42,100 - INFO - [2025-09-09 10:25:42] Salary detection complete +2025-09-09 10:27:03,741 - INFO - Shutting down Salary Analytics API... diff --git a/app/salary_analytics/__init__.py b/app/salary_analytics/__init__.py index babbabb..62f8ac0 100644 --- a/app/salary_analytics/__init__.py +++ b/app/salary_analytics/__init__.py @@ -36,5 +36,3 @@ def create_app() -> FastAPI: return app - -app = create_app() diff --git a/run.py b/run.py new file mode 100644 index 0000000..c4932c4 --- /dev/null +++ b/run.py @@ -0,0 +1,4 @@ +import os +from app.salary_analytics import create_app + +app = create_app() \ No newline at end of file