queue_flask / Dockerfile
multimodalart's picture
Update Dockerfile
3613c3f
raw
history blame
842 Bytes
# Use an official Python runtime as a parent image
FROM python:3.8-slim-buster
# Set environment variables
ENV PYTHONUNBUFFERED 1
ENV API_ENDPOINT=""
ENV WORKERS=2
# Set work directory in the container
WORKDIR /app
# Install necessary packages
RUN apt-get update \
&& apt-get install -y nginx \
&& apt-get clean
# Copy the current directory contents into the container at /app
COPY . /app
# Install any needed packages specified in requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Setup NGINX
RUN rm /etc/nginx/sites-enabled/default
COPY nginx.conf /etc/nginx/sites-available/
RUN ln -s /etc/nginx/sites-available/nginx.conf /etc/nginx/sites-enabled/
# Check Nginx config
RUN service nginx configtest
# Expose port for the app
EXPOSE 7680
# Start the application
CMD service nginx start && python app.py