Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions apps/nginx-strangler/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@
# Template de routing (sera substitué au démarrage)
COPY apps/nginx-strangler/conf.d/routing.conf /etc/nginx/templates/routing.conf.template

RUN touch /etc/nginx/conf.d/routing.conf

Check notice on line 13 in apps/nginx-strangler/Dockerfile

View check run for this annotation

cloud-pi-native-sonarqube / SonarQube Code Analysis

apps/nginx-strangler/Dockerfile#L13

Merge this RUN instruction with the consecutive ones.

# Donner à l'utilisateur nginx les droits d'écriture sur conf.d/ (pour envsubst au démarrage)
# et sur les répertoires de logs/pid nécessaires en mode non-root
RUN chown -R nginx:nginx \
/etc/nginx/nginx.conf \
/etc/nginx/conf.d \
/etc/nginx/conf.d/routing.conf \
/etc/nginx/templates \
/etc/nginx/mime.types \
/var/cache/nginx \
Expand All @@ -31,6 +33,6 @@
# puis démarre nginx en foreground
# Les variables substituées : LEGACY_UPSTREAM, NESTJS_UPSTREAM
CMD ["/bin/sh", "-c", \
"envsubst '${LEGACY_UPSTREAM} ${NESTJS_UPSTREAM}' < /etc/nginx/templates/routing.conf.template > /etc/nginx/conf.d/routing.conf && nginx -t && nginx -g 'daemon off;'"]
"envsubst '${LEGACY_UPSTREAM} ${NESTJS_UPSTREAM}' < /etc/nginx/templates/routing.conf.template >> /etc/nginx/conf.d/routing.conf && nginx -t && nginx -g 'daemon off;'"]

EXPOSE 8080