From 187bce97e79eb4ba777dc9deb7332325a4205e43 Mon Sep 17 00:00:00 2001 From: saani Date: Sun, 23 Nov 2025 23:29:50 +0000 Subject: [PATCH] added dockerfile --- dockerfile | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 dockerfile diff --git a/dockerfile b/dockerfile new file mode 100644 index 0000000..658b108 --- /dev/null +++ b/dockerfile @@ -0,0 +1,35 @@ +FROM python:3.11-slim + +# Set environment variables +ENV PYTHONDONTWRITEBYTECODE=1 +ENV PYTHONUNBUFFERED=1 + +# Set work directory +WORKDIR /app + +# Install dependencies +COPY requirements.txt /app/ +RUN pip install --upgrade pip && \ + pip install -r requirements.txt + +# Copy project +COPY . /app/ + +# Collect static files +RUN python manage.py collectstatic --noinput + +# Expose port +EXPOSE 8000 + +# Run gunicorn +CMD ["gunicorn", "booking_system.wsgi:application", "--bind", "0.0.0.0:8000"] +``` + +**Optional: Create `.dockerignore`:** +``` +*.pyc +__pycache__ +db.sqlite3 +.env +.git +venv/ \ No newline at end of file -- 2.39.5