[add]: code refractoring and cleanup
This commit is contained in:
+8
-5
@@ -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"]
|
||||
Reference in New Issue
Block a user