diff --git a/dashboard/Dockerfile b/dashboard/Dockerfile index 1861cb847..a5c53e18c 100644 --- a/dashboard/Dockerfile +++ b/dashboard/Dockerfile @@ -20,9 +20,13 @@ ENV SENTRY_ORG=incubateur ENV SENTRY_URL=https://sentry.fabrique.social.gouv.fr/ ENV SENTRY_PROJECT=mano -RUN --mount=type=secret,id=sentry_auth_token export SENTRY_AUTH_TOKEN=$(cat /run/secrets/sentry_auth_token); \ - yarn build && \ - yarn sentry:sourcemaps +RUN --mount=type=secret,id=sentry_auth_token \ + yarn build; \ + if [ -f "/run/secrets/sentry_auth_token" ]; then \ + export SENTRY_AUTH_TOKEN=$(cat /run/secrets/sentry_auth_token); \ + yarn sentry:sourcemaps; \ + fi + FROM ghcr.io/socialgouv/docker/nginx4spa:7.0.1