Spaces:
Runtime error
Runtime error
File size: 833 Bytes
a0f2e08 c45ec4f 3613c3f a0f2e08 c45ec4f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# 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"]
|