bugfix/issue-217-web-push-in-docker-image #219
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In Issue #217 I noticed that
web-push
is not present in the docker image which prevented me from using push notifications. I guess due to shrinking the image size the multi-stage docker build installs all packages in thebase
stage and then copies only necessary files to therelease
stage.See
Dockerfile
:But this results in
web-push
not being available inside therelease
stage, so I added these lines that copyweb-push
and thepnpm
dependencies of it.:For
web-push
to be runnable you also have to symlink the binary tonode_modules
similar to how theprisma
binary was linked:I would think that it now works but when running
npx web-push
inside the container, you get an error that the required dependencyminimist
is not present. So I copied it too:I also added a short comment to
.env.example
on how to generateweb-push
keys when using docker.I hope you like my solution, thank you for developing splitpro!