From 65b350322a5690544c7f092ce953f718132be5a9 Mon Sep 17 00:00:00 2001 From: brunobeeee Date: Wed, 7 May 2025 18:05:40 +0200 Subject: [PATCH 1/2] Copy web-push related folders into release stage --- docker/Dockerfile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docker/Dockerfile b/docker/Dockerfile index e8cd7d1..bf6519a 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -43,6 +43,14 @@ COPY --from=base /app/node_modules/sharp ./node_modules/sharp RUN mkdir node_modules/.bin RUN ln -s /app/node_modules/prisma/build/index.js ./node_modules/.bin/prisma +COPY --from=base /app/node_modules/web-push ./node_modules/web-push +COPY --from=base /app/node_modules/.pnpm/web-push@3.6.7 ./node_modules/.pnpm/web-push@3.6.7 +# Required dependency for web-push +COPY --from=base /app/node_modules/.pnpm/minimist@1.2.8 ./node_modules/.pnpm/minimist@1.2.8 + +# Symlink the web-push binary +RUN ln -s /app/node_modules/web-push/src/cli.js ./node_modules/.bin/web-push + # set this so it throws error where starting server ENV SKIP_ENV_VALIDATION="false" From cf9763ae50fc440fd7717c4fafc7934c5d1307ad Mon Sep 17 00:00:00 2001 From: Bruno <47213429+brunobeeee@users.noreply.github.com> Date: Thu, 8 May 2025 14:00:03 +0200 Subject: [PATCH 2/2] Add instructions on generating web-push keypair when using docker --- .env.example | 1 + 1 file changed, 1 insertion(+) diff --git a/.env.example b/.env.example index fdfcfe6..a691279 100644 --- a/.env.example +++ b/.env.example @@ -60,6 +60,7 @@ AUTHENTIK_ISSUER= # Push notification, Web Push: https://www.npmjs.com/package/web-push # generate web push keys using this command: web-push generate-vapid-keys --json +# when using docker use this command: docker compose exec splitpro npx web-push generate-vapid-keys --json WEB_PUSH_PRIVATE_KEY= WEB_PUSH_PUBLIC_KEY= WEB_PUSH_EMAIL=