diff --git a/.env.example b/.env.example index fdfcfe68..a691279d 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= diff --git a/docker/Dockerfile b/docker/Dockerfile index e8cd7d1e..bf6519ad 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"