This seems like kind of a waste of resources and an excessive attack surface. We should just be able to run npm build and then wrap up the public directory into an appropriately-configured Nginx container – but I need to get my head around Docker builds a bit more to work out how this should happen most efficiently.
Currently the approach to serving files is to [define a `prod` script for `npm` which runs `elm-live`](https://git.autonomic.zone/coop-cloud/abra-apps/src/branch/main/package.json#L8), [run it as the Docker `CMD`](https://git.autonomic.zone/coop-cloud/abra-apps/src/branch/main/Dockerfile#L15), and [port-forward to that from Traefik](https://git.autonomic.zone/coop-cloud/abra-apps/src/branch/main/compose.yml#L21).
This seems like kind of a waste of resources and an excessive attack surface. We should just be able to run `npm build` and then wrap up the `public` directory into an appropriately-configured Nginx container – but I need to get my head around Docker builds a bit more to work out how this should happen most efficiently.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Currently the approach to serving files is to define a
prodscript fornpmwhich runselm-live, run it as the DockerCMD, and port-forward to that from Traefik.This seems like kind of a waste of resources and an excessive attack surface. We should just be able to run
npm buildand then wrap up thepublicdirectory into an appropriately-configured Nginx container – but I need to get my head around Docker builds a bit more to work out how this should happen most efficiently.