init: initial Django LMS backend
This commit is contained in:
+53
@@ -0,0 +1,53 @@
|
||||
# =========================
|
||||
# Base Image
|
||||
# =========================
|
||||
FROM python:3.12-slim
|
||||
|
||||
# =========================
|
||||
# Environment Variables
|
||||
# =========================
|
||||
ENV PYTHONDONTWRITEBYTECODE=1
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
|
||||
# =========================
|
||||
# System Dependencies
|
||||
# =========================
|
||||
RUN apt-get update && apt-get install -y \
|
||||
build-essential \
|
||||
libpq-dev \
|
||||
curl \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# =========================
|
||||
# Working Directory
|
||||
# =========================
|
||||
WORKDIR /app
|
||||
|
||||
# =========================
|
||||
# Python Dependencies
|
||||
# =========================
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# =========================
|
||||
# Copy Project Files
|
||||
# =========================
|
||||
COPY . .
|
||||
|
||||
# =========================
|
||||
# Collect Static Files
|
||||
# =========================
|
||||
RUN python manage.py collectstatic --noinput
|
||||
|
||||
# =========================
|
||||
# Expose Application Port
|
||||
# =========================
|
||||
EXPOSE 8000
|
||||
|
||||
# =========================
|
||||
# Run Application
|
||||
# =========================
|
||||
CMD ["gunicorn", "core.wsgi:application", \
|
||||
"--bind", "0.0.0.0:8000", \
|
||||
"--workers", "3", \
|
||||
"--timeout", "120"]
|
||||
Reference in New Issue
Block a user