queue_flask / Dockerfile
multimodalart's picture
Update Dockerfile
c45ec4f
raw
history blame
833 Bytes
# Use an official Python runtime as a parent image
FROM python:3.8-slim-buster
# Set environment variables
ENV PYTHONUNBUFFERED 1
# 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/
# Test Nginx config
RUN nginx -t
# Give execution permissions to start.sh
RUN chmod +x start.sh
# Expose port for the app
EXPOSE 7680
# Start the application
CMD ["./start.sh"]