From a2bc2f287e01da89ac70cadb4601f17b77e15c8b Mon Sep 17 00:00:00 2001 From: holysoles Date: Thu, 8 Feb 2024 01:42:47 +0000 Subject: [PATCH] init dockerfile --- Dockerfile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..d810915 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,16 @@ +# Use the official Python 3.8 slim image as the base image +FROM python:3.8-slim + +WORKDIR /app + +# Copy the necessary files and directories into the container +COPY static/ ./static/ +COPY templates/ ./templates/ +COPY blog/ ./blog/ +COPY app.py requirements.txt ./ + +# Upgrade pip and install Python dependencies +RUN pip3 install --upgrade pip && pip install --no-cache-dir -r requirements.txt + +EXPOSE 5000 +CMD ["gunicorn", "app:app", "-b", "0.0.0.0:5000", "-w", "4"]