Closed telnetdoogie closed 2 months ago
I realize you accidentally made PR to the wrong repo but it looks like you're doing very sub-optimal image here, you should build this project in a Docker that has all the build dependencies then copy outputs to a different image that is only running some static file server (e.g. nginx). See Docker multi-stage builds. Also you shouldn't run it with the npm development server.
Yeah, apologies for the errant PR, I was intending to merge into main of my fork.
Incremental progress... I just wanted to see if I could get this running for someone in docker which I was able to do. I started playing with doing the build / compile and then deploying just the build to nginx last night but didn't get super far, it was way late :)
What I also intend to do is to pull away from the fork and just have a 'docker wrapper' repo, that can pull your repo just as part of the build, unless you want a build in your repo at some point.
I'm no expert on this stuff, just hacking
you should build this project in a Docker that has all the build dependencies then copy outputs to a different image that is only running some static file server (e.g. nginx). See Docker multi-stage builds. Also you shouldn't run it with the npm development server.
I will try this, thanks for the insights... learning every day!
Yeah, apologies for the errant PR, I was intending to merge into main of my fork.
No worries.
What I also intend to do is to pull away from the fork and just have a 'docker wrapper' repo, that can pull your repo just as part of the build, unless you want a build in your repo at some point.
Docker I don't think I'll be adding, Github CI would be more important first. I don't see much benefit from self hosting this tbh, all of the processing is happening always in the client browser anyways.
You actually don't need to build it, you can just get the files from gh-pages
branch and host it with any static file server.
ah this is so helpful!! Thanks! This person was asking about self-hosting so they can use it offline. Doesn't seem like that's hugely beneficial to me either, but I'm learning from messing with this stuff so I super appreciate the guidance!! I'm trying to stretch my homelab muscles and I'm definitely learning stuff through making mistakes and trying over.
Yep, one more thing, I don't see calls to .sh
builds scripts (as in the readme), npm run build
is not enough. You must have xdelta3.js
and xdelta3.wasm
in the image, without them the UI will load but patching won't actually work.
Thanks so much!! I have learned a lot the past couple of days!
https://github.com/telnetdoogie/xdelta-wasm-docker much cleaner now.
The only thing I added is a redirect from /
to /xdelta-wasm/
for folks spinning this up in docker and/or using reverse proxy.
There's also a docker-compose.yml
in that repo if they want to run the version from docker hub.
SUPER appreciate your help!
Results in a slightly smaller image. Also added healthchecks for startup