frontend
frontend copied to clipboard
feat: dockerize initial
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.ymlin 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
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.
Making sure of that, thanks 👍
I'll be finishing up the MR presumably by the end of the weekend.
Before handing over the PR for review, there are still a few things left to do:
- [x] Create multi-stage Dockerfile and accompanying
compose.ymlto develop in "devcontainer" as well as run prod setup standalone - [x] Initial test of
devandprodtarget 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-hostedrepocompose.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