Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.

Commit

Permalink
chore: Update Django and Docker configurations for deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
basilelt committed Jun 12, 2024
1 parent 1091a66 commit 0c1448c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Django_api/airline/airline/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@
]

if ENVIRONMENT == 'development':
WSGI_APPLICATION = 'monprojet.wsgi.application'
WSGI_APPLICATION = 'airline.wsgi.application'
else:
ASGI_APPLICATION = 'monprojet.asgi.application'
ASGI_APPLICATION = 'airline.asgi.application'


# Database
Expand Down
Binary file added Django_api/requirements.txt
Binary file not shown.
6 changes: 3 additions & 3 deletions Docker/API/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
FROM python:3.12

ADD ../../../Django_Frontend/ /app
ADD ../../../Django_api/ /app

RUN set -ex \
&& python -m venv /env \
&& /env/bin/pip install --upgrade pip \
&& /env/bin/pip install --no-cache-dir -r /app/requirements.txt

WORKDIR /app/monprojet
WORKDIR /app/airline

ENV VIRTUAL_ENV /env
ENV PATH /env/bin:$PATH

RUN python manage.py djecrety -s

CMD ["daphne", "-b", "0.0.0.0", "-p", "8000", "monprojet.asgi:application"]
CMD ["daphne", "-b", "0.0.0.0", "-p", "8000", "airline.asgi:application"]

0 comments on commit 0c1448c

Please sign in to comment.