21 lines
567 B
Docker
21 lines
567 B
Docker
# Use the official Python image with Python 3.10
|
|
FROM python:3.10
|
|
|
|
# Set the working directory to /app
|
|
WORKDIR /app
|
|
|
|
# Copy the server files and requirements.txt into the container at /app
|
|
COPY ../server/ ../requirements.txt /app/
|
|
|
|
# Install any needed packages specified in requirements.txt
|
|
RUN pip install --trusted-host pypi.python.org -r requirements.txt
|
|
|
|
# Expose port 5000 for the Flask app to listen on
|
|
EXPOSE 5000
|
|
|
|
# Define environment variable for Flask to run in production mode
|
|
ENV FLASK_ENV=production
|
|
|
|
# Run the Flask app
|
|
CMD ["python", "server_api.py"]
|