From b93a8e9e4b947f383d9bfa2eea43440016675eb2 Mon Sep 17 00:00:00 2001 From: greg Date: Thu, 19 Sep 2024 14:19:57 +0200 Subject: [PATCH] update Dockerfile for files permissions --- Dockerfile | 10 ++++++---- README.md | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 32af1d2..53906d7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,14 +3,16 @@ FROM nginx:1.21.6-alpine LABEL maintainer="greg.lebreton@hotmail.com" COPY --chown=nginx:nginx --chmod=755 ./html /usr/share/nginx/html - RUN apk add --no-cache bash && \ rm -rf /var/cache/apk/* && \ - chmod -R 755 /usr/share/nginx/html + chmod -R 755 /usr/share/nginx/html && \ + mkdir -p /var/cache/nginx && \ + chown -R nginx:nginx /var/cache/nginx && \ + chmod -R 755 /var/cache/nginx EXPOSE 80 -USER nginx HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD curl -f http://localhost/ || exit 1 +USER nginx -CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file +CMD ["nginx", "-g", "daemon off;"] diff --git a/README.md b/README.md index 2c6b298..433d82b 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ git checkout -b deploy git push origin -u deploy ``` -4. Le site est disponible à l'adresse username.nom_du_projet.legaragenumerique.xyz +4. Le site est disponible à l'adresse https://username.nom_du_projet.legaragenumerique.xyz exemple pour l'utilisateur greg avec un projet portfolio: > https://greg.portfolio.legaragenumerique.xyz