update Dockerfile for files permissions

This commit is contained in:
Grégory Lebreton 2024-09-19 14:19:57 +02:00
parent afe037c28e
commit b93a8e9e4b
2 changed files with 7 additions and 5 deletions

View File

@ -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;"]
CMD ["nginx", "-g", "daemon off;"]

View File

@ -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