frontend icon indicating copy to clipboard operation
frontend copied to clipboard

feat: dockerize initial

Open Flash1232 opened this issue 1 month ago • 3 comments

As discussed in https://github.com/stoatchat/self-hosted/issues/176

TODOs:

  • [ ] Finish Dockerfile
    • [x] Prod stage (static dist after build)
    • [x] Dev stage (expose source via volume mounts)
  • [ ] Add CI build & push
  • [x] Update compose.yml in self-hosted repo (https://github.com/stoatchat/self-hosted/pull/177)

would be cool :tm: (maybe in follow-up PR):

  • [ ] Add CSP and some basic hardening to nginx conf

Flash1232 avatar Nov 16 '25 18:11 Flash1232

Just a heads-up, build:prod is specifically referring to our production deployment, it is maybe a bit confusingly worded and should probably be renamed or removed entirely.

insertish avatar Nov 19 '25 11:11 insertish

Making sure of that, thanks 👍

I'll be finishing up the MR presumably by the end of the weekend.

Flash1232 avatar Nov 20 '25 22:11 Flash1232

Before handing over the PR for review, there are still a few things left to do:

  • [x] Create multi-stage Dockerfile and accompanying compose.yml to develop in "devcontainer" as well as run prod setup standalone
  • [x] Initial test of dev and prod target stages (login/register screens visible, no apparent issues in prod setup, dev setup auto-reloads when changing .env, config or any source files)
  • [ ] Test using the new service/image in self-hosted repo compose.yml (couldn't get the dockerized frontend to connect to the API, probably am not aware of a config or something something name resolution via caddy or container name?)
  • [ ] Test Github image publishing (@insertish is that something you have a template for anyways, or have specific requests for me to test this with?)
  • [ ] Document potential diffs or new dev flows using Docker

Flash1232 avatar Nov 23 '25 22:11 Flash1232