I HATE DOCKER i love Docker!!
So, I didn’t even write a devlog yesterday because I spent the entirety of the time that I did have setting up a Dockerfile and docker-compose.yml for LARPARDY.
…why did it take that long
Because I’ve never used Docker before! Well, I have, to run services on my PC and my homelab server, but I’ve never used it for my own projects before.
Specifically, I want to go ahead and set up Docker because I know that I’m going to need a database (or possibly two! SQL + Redis), and running everything together in a container will make both development AND deployment much easier for me.
I’ve never used it before, so this is, uh, a learning experience, to say the least.
oh also, pnpm
Oh. Also. pnpm has a bug. Apparently.
I’m using pnpm as the package manager for both the server and the client (since they’re both TypeScript projects). Both projects are stored in a monorepo (literally meaning just a repo with multiple projects, basically), which makes it easy to manage for me and keeps my commits together.
Nicely, pnpm recommends a Dockerfile for this exact scenario! I reconfigured the project to use pnpm‘s workspaces feature (which… is seperate from package.json’s workspaces, for some reason) so that this would work.
pnpm deploy is supposed to copy the project with it’s own node_modules since workspaces use a shared one. The problem is that, when it rewrites workspace dependencies (because I have a shared package for both the server & client), it links it to the wrong source, which no longer exists after it’s copied!
I tried to debug and get this working for ACTUAL AGES before I gave up and just wrote commands that manually copy the files instead.
I figured that there HAS to be a way to get this working, considering the documentation itself recommends this build file. But noooope. It doesn’t seem so (cite: this GitHub issue which has been open since… 2023???).

so what did you actually do
The Docker config works now, and that’s the important thing! I currently have the client build into an nginx image, but I’m either going to drop this entirely or have the server serve the client files itself. This will allow me to implement Discord proxy header verification too, if I decide to.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.