2024-07-09 01:50:39 +03:00

27 lines
594 B
Plaintext

# Use an official Python image as a base
FROM python:3.9-slim
# Set the working directory to /app
WORKDIR /app
# Copy the requirements file
COPY requirements.txt /app/requirements.txt
# Install the dependencies
RUN pip install -r requirements.txt
# Copy the application code
COPY . /app/
# Set the PYTHONPATH environment variable
ENV PYTHONPATH="/app"
# Set the FLASK_APP environment variable
ENV FLASK_APP=app.py
# Expose the port the application will use
EXPOSE 5000
# Run the command to start the development server when the container launches
CMD ["flask", "run", "--host=0.0.0.0"]