[add]: code refractoring and cleanup

This commit is contained in:
VivianDee
2025-09-07 23:07:40 +01:00
parent 2cc3d70f4f
commit 6de9583aaf
25 changed files with 86 additions and 60 deletions
+8 -5
View File
@@ -1,20 +1,23 @@
FROM python:3.11-slim
# Set the working directory in the container
WORKDIR /app
# Copy the current directory contents into the container at /app
COPY . /app
RUN apt-get update && apt-get install -y libpq-dev && rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY salary_analytics/ ./salary_analytics/
RUN mkdir -p output/csv output/plots output/models
ENV PYTHONPATH=/app
ENV HOST=0.0.0.0
ENV PORT=8000
ENV FLASK_APP=wsgi.py
ENV FLASK_RUN_HOST=0.0.0.0
EXPOSE 8000
CMD ["uvicorn", "salary_analytics.api:app", "--host", "0.0.0.0", "--port", "8000", "--reload"]
CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:8000", "wsgi:wsgi_app"]