From 4497dd4524f068761a8564a6d7210dc61424b967 Mon Sep 17 00:00:00 2001 From: ChaudharyRaman Date: Sun, 22 Oct 2023 02:17:58 +0530 Subject: [PATCH] changes --- backend/Dockerfile | 7 ++++--- backend/core/settings.py | 1 + docker-compose.yml | 2 ++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index a7dbab2..22ae679 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -1,7 +1,8 @@ FROM python:3.10-alpine +WORKDIR /usr/src/app +ENV PYTHONDONTWRITEBYTECODE 1 ENV PYTHONUNBUFFERED 1 -WORKDIR /django -COPY requirements.txt requirements.txt -# RUN pip install --upgrade pip +RUN pip install --upgrade pip +COPY requirements.txt . RUN pip install -r requirements.txt COPY . . \ No newline at end of file diff --git a/backend/core/settings.py b/backend/core/settings.py index a7b8575..2e0da87 100644 --- a/backend/core/settings.py +++ b/backend/core/settings.py @@ -17,6 +17,7 @@ DEBUG = True ALLOWED_HOSTS = ['*'] +# ALLOWED_HOSTS = os.environ.get('DJANGO_ALLOWED_HOSTS').split(' ') CORS_ORIGIN_ALLOW_ALL = False CORS_ORIGIN_WHITELIST = ['http://localhost:3000', ] diff --git a/docker-compose.yml b/docker-compose.yml index 07d7996..d331261 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,6 +8,8 @@ services: command: python manage.py runserver 0.0.0.0:8000 ports: - 8000:8000 + volumes: + - ./backend/:/usr/src/app/ environment: - DEBUG=1 - SECRET_KEY=35%fnl)_3v67^9os3%5bo+vv)$l&a6k#_&21i-xl7%_%#sa5(v