fix: start web services in Portainer Swarm
All checks were successful
Build and deploy / Validate source (push) Successful in 7s
Build and deploy / Publish images and notify Portainer (push) Successful in 43s

This commit is contained in:
Cauê Faleiros
2026-09-18 12:02:31 -03:00
parent e3e37f674d
commit 7605ca9918
2 changed files with 5 additions and 12 deletions

View File

@@ -18,5 +18,10 @@ ENV WEB_INDEX=index.html PUBLIC_HOST=invalid.example S3_PUBLIC_ENDPOINT=https://
COPY --from=policy /build/default.conf.template /etc/nginx/templates/default.conf.template
COPY dtf-site.html /usr/share/nginx/html/index.html
COPY local/static/ /usr/share/nginx/html/
# The official entrypoint renders the server configuration at startup and Nginx
# writes its PID/cache files. Keep the service non-root while granting it
# ownership of only those runtime locations. This works in Docker Swarm,
# where the previous read-only/tmpfs combination was not mounted as expected.
RUN chown -R 101:101 /etc/nginx/conf.d /var/cache/nginx /run
USER 101:101
EXPOSE 8080