Modif docker + ajout de la fonction de text aléatoire

This commit is contained in:
ElPoyo
2025-09-29 16:48:38 +02:00
parent 5d0993bda3
commit 4e11fd9a06
5 changed files with 43 additions and 7 deletions

View File

@@ -12,7 +12,12 @@ RUN npm install
# Copie des fichiers source
COPY . .
# Build de l'application (sans définir d'URL spécifique)
# Argument de build pour l'URL de l'API
ARG VITE_TEXTS_API_URL
ENV VITE_TEXTS_API_URL=${VITE_TEXTS_API_URL}
# Build de l'application
RUN echo "Building with VITE_TEXTS_API_URL=$VITE_TEXTS_API_URL"
RUN npm run build
# Étape de production avec Nginx
@@ -21,10 +26,6 @@ FROM nginx:alpine
# Copie des fichiers buildés depuis l'étape précédente
COPY --from=build /app/dist /usr/share/nginx/html
# Copie du script de configuration de l'API
COPY 30-api-config.sh /docker-entrypoint.d/30-api-config.sh
RUN chmod +x /docker-entrypoint.d/30-api-config.sh
# Exposition explicite du port utilisé par Nginx
EXPOSE 80