CHA0sTIG3R/BlogWriterApp
37
1# Use the official Python image as base2FROM python:3.93 4# Set environment variables5ENV FLASK_APP=app.py \6 FLASK_RUN_HOST=0.0.0.0 \7 FLASK_RUN_PORT=78608 9# Set the working directory in the container10WORKDIR /code11 12# Copy the requirements file into the container at /app13COPY ./requirements.txt /code/requirements.txt14 15# Install any needed dependencies specified in requirements.txt16RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt17 18# Expose the secret OPENAI_API_KEY environment variable at build time19RUN --mount=type=secret,id=OPENAI_API_KEY,mode=0444,required=true20 21# Copy the rest of the application code into the container at /app22COPY . .23 24# Expose the port that Flask is running on25EXPOSE 786026 27# Command to run the application when the container starts28CMD ["flask", "run", "--host=0.0.0.0", "--port=7860"]29 