feat: Adds a Docker Build for the Web Client#697
Merged
reeesespuffs merged 7 commits intostoatchat:mainfrom Feb 19, 2026
Merged
feat: Adds a Docker Build for the Web Client#697reeesespuffs merged 7 commits intostoatchat:mainfrom
reeesespuffs merged 7 commits intostoatchat:mainfrom
Conversation
Signed-off-by: Steven Luther <steven@lutherlabs.com>
Signed-off-by: Steven Luther <steven@lutherlabs.com>
Signed-off-by: Steven Luther <steven@lutherlabs.com>
Signed-off-by: Steven Luther <steven@lutherlabs.com>
Contributor
Author
|
I was just reading over the other Docker PR. I think the dist_injected directory actually helps (solves?) the security issue brought up in this comment, and the one below it. Or at least is an implementation of the tmpfs that was talked about there. I am not sure that either Nginx + SSI or the env inject approach are any more secure than the other. If an attacker gets access to the file system, both methods will have a writable filesystem they can access. I'm not a security expert, but it doesnt' seem much different if they get container access in one vs. the other. |
chrishultin
reviewed
Feb 13, 2026
Signed-off-by: Steven Luther <steven@lutherlabs.com>
Dadadah
approved these changes
Feb 19, 2026
reeesespuffs
approved these changes
Feb 19, 2026
Jade3375
pushed a commit
that referenced
this pull request
Feb 26, 2026
* feat: add runtime env injection script and server package Signed-off-by: Steven Luther <steven@lutherlabs.com> * fix: remove revolt env vars Signed-off-by: Steven Luther <steven@lutherlabs.com> * ci: add GitHub Actions workflow for Docker image build and push Signed-off-by: Steven Luther <steven@lutherlabs.com> * improvement: rewrite to use native node packages Signed-off-by: Steven Luther <steven@lutherlabs.com> * improvement: bump Docker base image from Node 22 to Node 24 LTS Signed-off-by: Steven Luther <steven@lutherlabs.com> --------- Signed-off-by: Steven Luther <steven@lutherlabs.com> Signed-off-by: Jade3375 <floodlockgames9@gmail.com>
Jade3375
pushed a commit
that referenced
this pull request
Feb 26, 2026
* feat: add runtime env injection script and server package Signed-off-by: Steven Luther <steven@lutherlabs.com> * fix: remove revolt env vars Signed-off-by: Steven Luther <steven@lutherlabs.com> * ci: add GitHub Actions workflow for Docker image build and push Signed-off-by: Steven Luther <steven@lutherlabs.com> * improvement: rewrite to use native node packages Signed-off-by: Steven Luther <steven@lutherlabs.com> * improvement: bump Docker base image from Node 22 to Node 24 LTS Signed-off-by: Steven Luther <steven@lutherlabs.com> --------- Signed-off-by: Steven Luther <steven@lutherlabs.com> Signed-off-by: Jade3375 <floodlockgames9@gmail.com>
Pecacheu
pushed a commit
to Pecacheu/for-web
that referenced
this pull request
Mar 2, 2026
* feat: add runtime env injection script and server package Signed-off-by: Steven Luther <steven@lutherlabs.com> * fix: remove revolt env vars Signed-off-by: Steven Luther <steven@lutherlabs.com> * ci: add GitHub Actions workflow for Docker image build and push Signed-off-by: Steven Luther <steven@lutherlabs.com> * improvement: rewrite to use native node packages Signed-off-by: Steven Luther <steven@lutherlabs.com> * improvement: bump Docker base image from Node 22 to Node 24 LTS Signed-off-by: Steven Luther <steven@lutherlabs.com> --------- Signed-off-by: Steven Luther <steven@lutherlabs.com>
amycatgirl
pushed a commit
to amycatgirl/stoat-frontend
that referenced
this pull request
Mar 17, 2026
* feat: add runtime env injection script and server package Signed-off-by: Steven Luther <steven@lutherlabs.com> * fix: remove revolt env vars Signed-off-by: Steven Luther <steven@lutherlabs.com> * ci: add GitHub Actions workflow for Docker image build and push Signed-off-by: Steven Luther <steven@lutherlabs.com> * improvement: rewrite to use native node packages Signed-off-by: Steven Luther <steven@lutherlabs.com> * improvement: bump Docker base image from Node 22 to Node 24 LTS Signed-off-by: Steven Luther <steven@lutherlabs.com> --------- Signed-off-by: Steven Luther <steven@lutherlabs.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This adds a multi-stage docker build for the web client. This was missing in the self-hosted compose (or at least was using the old UI).
Just a quick bit on the inject.js script, that runs at container startup and copies the built
dist/todist_injected/, does a find and replace of the placeholder strings with the actual env vars, and serves the result, but the originaldistisn't touched, so containers restart cleanly....Or do they. Now that I write that, I might have over-engineered that bit, and it only needs to do the replace, any container/pod restarts would just restore the original
dist/. Let me know which direction you'd want to go with that, and I can modify it. The replace needs to happen regardless. Maybe it's useful to keep the original around 🤷You can test it though:
docker build -t for-web .docker run -e VITE_API_URL=https://api.stoat.chat -e VITE_WS_URL=wss://ws.stoat.chat -p 5000:5000 for-web