MedBot_backend / Dockerfile
NitinBot001's picture
Update Dockerfile
246f521 verified
raw
history blame
557 Bytes
FROM python:3.12-slim
# Create non-root user
RUN useradd -m appuser
WORKDIR /app
# Install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy project files
COPY . .
# Change ownership to non-root user
RUN chown -R appuser:appuser /app
# Switch to non-root user
USER appuser
# Expose only main app port
EXPOSE 7860
# Start all three apps
CMD ["sh", "-c", "\
gunicorn -b 0.0.0.0:7860 main:app & \
gunicorn -b 0.0.0.0:5001 disease:app & \
gunicorn -b 0.0.0.0:5002 medicine:app && \
wait \
"]