add dockerfile

This commit is contained in:
TDLaouer 2025-07-13 18:33:17 +02:00
parent 7295019fad
commit c1bdc2290b
2 changed files with 14 additions and 2 deletions

12
Dockerfile Normal file
View File

@ -0,0 +1,12 @@
FROM python:3.13.5-slim-bookworm
WORKDIR /usr/src/app
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
RUN pip install --upgrade pip
COPY ./requirements.txt .
RUN pip install -r requirements.txt
COPY . .

View File

@ -21,9 +21,9 @@ BASE_DIR = Path(__file__).resolve().parent.parent
# See https://docs.djangoproject.com/en/5.2/howto/deployment/checklist/
SECRET_KEY = os.environ.get("SECRET_KEY")
DEBUG = os.environ.get("DEBUG") == "True"
DEBUG = bool(os.environ.get("DEBUG", default=0))
ALLOWED_HOSTS = [".sop.tdlaouer.fr", ".localhost"]
ALLOWED_HOSTS = os.environ.get("DJANGO_ALLOWED_HOSTS").split(" ")
CORS_ALLOWED_ORIGINS = [
"http://localhost:3000",