From 2f1926a4b306c1648c05b33739aca8b41ef6c2e7 Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Wed, 29 Nov 2023 16:43:46 +0530 Subject: [PATCH] Add dockerfile --- Dockerfile | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..2351cd8 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,26 @@ +# Use the official Python image from the Docker Hub +FROM python:3.10.6 + +# Set environment variables +ENV PYTHONDONTWRITEBYTECODE 1 +ENV PYTHONUNBUFFERED 1 + +# Set the working directory in the container +WORKDIR /app + +# Copy the requirements file to the working directory +COPY requirements.txt /app/ + +# Install dependencies +RUN pip install --upgrade pip +RUN pip install -r requirements.txt + +# Copy the entire project to the working directory in the container +COPY . /app/ + +# Expose the port the app runs on +EXPOSE 8000 + +# Command to run the application +CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"] +