-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#183][migrate] all migrate fix for profile , friendship, and auth
- Loading branch information
Axel Vaganay
committed
Mar 25, 2024
1 parent
4203387
commit d1fb36b
Showing
7 changed files
with
100 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,60 @@ | ||
# # Dockerfile du service profile | ||
# Dockerfile du service profile | ||
|
||
# FROM python:3.12-bookworm | ||
FROM python:3.12-bookworm | ||
|
||
# RUN mkdir /auth | ||
# WORKDIR /auth | ||
RUN mkdir /auth | ||
WORKDIR /auth | ||
|
||
# COPY requirements.txt /auth/ | ||
# RUN pip install --upgrade pip \ | ||
# && pip install --no-cache-dir -r requirements.txt | ||
COPY requirements.txt /auth/ | ||
RUN pip install --upgrade pip \ | ||
&& pip install --no-cache-dir -r requirements.txt | ||
|
||
# COPY /auth/. . | ||
COPY /auth/. . | ||
|
||
# COPY script_python.sh /usr/local/bin/ | ||
# RUN chmod +x /usr/local/bin/script_python.sh | ||
# ENTRYPOINT [ "script_python.sh" ] | ||
COPY script_python.sh /usr/local/bin/ | ||
RUN chmod +x /usr/local/bin/script_python.sh | ||
ENTRYPOINT [ "script_python.sh" ] | ||
|
||
# EXPOSE 8001 | ||
# # CMD ["tail", "-f", "/dev/null"] | ||
EXPOSE 8001 | ||
# CMD ["tail", "-f", "/dev/null"] | ||
|
||
# ################################################## | ||
|
||
FROM python:3.12-bookworm | ||
# FROM python:3.12-bookworm | ||
|
||
# configuration de l'environnement Python qui evite lq creation de fichiers .pyc | ||
ENV PYTHONDONTWRITEBYTECODE 1 | ||
# desactiver le buffering de la sortie standard | ||
# assurant que la sortie est immediatement affichee sans delai | ||
ENV PYTHONUNBUFFERED 1 | ||
# # configuration de l'environnement Python qui evite lq creation de fichiers .pyc | ||
# ENV PYTHONDONTWRITEBYTECODE 1 | ||
# # desactiver le buffering de la sortie standard | ||
# # assurant que la sortie est immediatement affichee sans delai | ||
# ENV PYTHONUNBUFFERED 1 | ||
|
||
WORKDIR /app | ||
# WORKDIR /app | ||
|
||
# copie du fichier des dependances dans le conteneur | ||
COPY requirements.txt /app/ | ||
# # copie du fichier des dependances dans le conteneur | ||
# COPY requirements.txt /app/ | ||
|
||
# Mise a jour pip et install les dependances | ||
RUN pip install --upgrade pip \ | ||
&& pip install --no-cache-dir -r requirements.txt | ||
# # Mise a jour pip et install les dependances | ||
# RUN pip install --upgrade pip \ | ||
# && pip install --no-cache-dir -r requirements.txt | ||
|
||
# copie du contenu de Django de l'appli dans le conteneur | ||
COPY . /app/ | ||
# # copie du contenu de Django de l'appli dans le conteneur | ||
# COPY . /app/ | ||
|
||
# COPY ./script_python.sh /app/ | ||
# RUN chmod 777 ./script_python.sh | ||
# # COPY ./script_python.sh /app/ | ||
# # RUN chmod 777 ./script_python.sh | ||
|
||
EXPOSE 8001 | ||
# EXPOSE 8001 | ||
|
||
# WORKDIR /app/auth | ||
# # WORKDIR /app/auth | ||
|
||
# # lancer l'appli Django | ||
# CMD ["python", "manage.py", "runserver", "0.0.0.0:8001"] | ||
# # # lancer l'appli Django | ||
# # CMD ["python", "manage.py", "runserver", "0.0.0.0:8001"] | ||
|
||
WORKDIR /app/auth | ||
# WORKDIR /app/auth | ||
|
||
RUN chmod +x ./script_python.sh | ||
RUN chmod +x ./wait-for-it.sh | ||
# RUN chmod +x ./script_python.sh | ||
# RUN chmod +x ./wait-for-it.sh | ||
|
||
# CMD ["python", "manage.py", "runserver", "0.0.0.0:8001"] | ||
CMD ["./script_python.sh"] | ||
# CMD ["ls", "-l", "script_python.sh"] | ||
# # CMD ["python", "manage.py", "runserver", "0.0.0.0:8001"] | ||
# CMD ["./script_python.sh"] | ||
# # CMD ["ls", "-l", "script_python.sh"] |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
# Pour utiliser Postgres | ||
python3 manage.py makemigrations | ||
|
||
# Exécuter les migrations | ||
python3 manage.py migrate | ||
|
||
# Lancer l'application Django | ||
python3 manage.py runserver 0.0.0.0:8001 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,60 @@ | ||
# # Dockerfile du service profile | ||
# Dockerfile du service profile | ||
|
||
# FROM python:3.12-bookworm | ||
FROM python:3.12-bookworm | ||
|
||
# RUN mkdir /friendshipApp | ||
# WORKDIR /friendshipApp | ||
RUN mkdir /friendshipApp | ||
WORKDIR /friendshipApp | ||
|
||
# COPY requirements.txt /friendshipApp/ | ||
# RUN pip install --upgrade pip \ | ||
# && pip install --no-cache-dir -r requirements.txt | ||
COPY requirements.txt /friendshipApp/ | ||
RUN pip install --upgrade pip \ | ||
&& pip install --no-cache-dir -r requirements.txt | ||
|
||
# COPY /friendshipApp/. . | ||
COPY /friendshipApp/. . | ||
|
||
# COPY script_python.sh /usr/local/bin/ | ||
# RUN chmod +x /usr/local/bin/script_python.sh | ||
# ENTRYPOINT [ "script_python.sh" ] | ||
COPY script_python.sh /usr/local/bin/ | ||
RUN chmod +x /usr/local/bin/script_python.sh | ||
ENTRYPOINT [ "script_python.sh" ] | ||
|
||
# EXPOSE 8003 | ||
# # CMD ["tail", "-f", "/dev/null"] | ||
EXPOSE 8003 | ||
# CMD ["tail", "-f", "/dev/null"] | ||
|
||
# ################################################## | ||
|
||
# Dockerfile du service profile | ||
# # Dockerfile du service profile | ||
|
||
FROM python:3.12-bookworm | ||
# FROM python:3.12-bookworm | ||
|
||
# Autres configurations du Dockerfile | ||
# # Autres configurations du Dockerfile | ||
|
||
WORKDIR /app | ||
# WORKDIR /app | ||
|
||
COPY requirements.txt /app/ | ||
# COPY requirements.txt /app/ | ||
|
||
# # Pour fix le probleme backports.zoneinfo | ||
# RUN pip install --upgrade pip setuptools wheel | ||
# # # Pour fix le probleme backports.zoneinfo | ||
# # RUN pip install --upgrade pip setuptools wheel | ||
|
||
# Mise a jour pip et install les dependances | ||
RUN pip install --upgrade pip \ | ||
&& pip install --no-cache-dir -r requirements.txt | ||
# # Mise a jour pip et install les dependances | ||
# RUN pip install --upgrade pip \ | ||
# && pip install --no-cache-dir -r requirements.txt | ||
|
||
# Copie des fichiers de l'application | ||
COPY . /app/ | ||
# COPY ./authentification/auth/ /app/ | ||
# # Copie des fichiers de l'application | ||
# COPY . /app/ | ||
# # COPY ./authentification/auth/ /app/ | ||
|
||
# WORKDIR / | ||
# # WORKDIR / | ||
|
||
# COPY ./authentification/auth/ /app/auth/ | ||
# # COPY ./authentification/auth/ /app/auth/ | ||
|
||
# Exposer le port sur lequel l'application Django écoute à l'intérieur du conteneur | ||
EXPOSE 8003 | ||
# # Exposer le port sur lequel l'application Django écoute à l'intérieur du conteneur | ||
# EXPOSE 8003 | ||
|
||
WORKDIR /app/friendshipApp | ||
# WORKDIR /app/friendshipApp | ||
|
||
RUN chmod +x ./script_python.sh | ||
RUN chmod +x ./wait-for-it.sh | ||
# RUN chmod +x ./script_python.sh | ||
# RUN chmod +x ./wait-for-it.sh | ||
|
||
# Commande pour lancer l'application Django | ||
# CMD ["python3", "manage.py", "runserver", "0.0.0.0:8002"] | ||
CMD [ "./script_python.sh" ] | ||
# # Commande pour lancer l'application Django | ||
# # CMD ["python3", "manage.py", "runserver", "0.0.0.0:8002"] | ||
# CMD [ "./script_python.sh" ] | ||
|
||
# CMD ["tail", "-f", "/dev/null"] | ||
# # CMD ["tail", "-f", "/dev/null"] |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
# Pour utiliser Postgres | ||
python3 manage.py makemigrations | ||
|
||
# Exécuter les migrations | ||
python3 manage.py migrate | ||
|
||
# Lancer l'application Django | ||
python3 manage.py runserver 0.0.0.0:8003 |
This file was deleted.
Oops, something went wrong.