There's currently no best practice for how to set up such an environment. Play with the kartotherian chart's values-devel.yaml and see what can be done.
Investigate alternative hot reload implementations:
(1) [ ] Set up IDE to rebuild chart and redeploy in a convenient way. Trigger rebuild on file change or hotkey.
- Has the advantage of matching production more closely.
- Need to stabilize the services' external port number, or rewire each time in MediaWiki local settings.
- Script to kubectl un/install
- Requires publishing the built image to a local or a private docker registry.
- To set up a local registry:
- minikube addons enable registry
- Forward registry from minikube to docker with:
- docker run --rm -it --network=host alpine ash -c "apk add socat && socat TCP-LISTEN:5000,reuseaddr,fork TCP:$(minikube ip):5000"
- To set up a local registry:
- Wrap rebuild in fswatch
- VSCode "kubernetes" extension can find pods and helm releases
- Port to IDEA environment
- Status: Verified each step, now they should be documented and if possible, packaged.
(2) [ ] "nodemon" entrypoint within the container and mount source directory from host
- Requires the developer to mount source dir thus:
- minikube mount /home/.../kartotherian:/srv/kartotherian
- The existing dev environment does this: nodemon --ext js,json,yaml --signal SIGHUP server.js -c config.docker.yaml
- Status: Almost got this working, except hot refresh is still elusive. Maybe "notify" is unavailable.
We'll also want a way to import a bit of sample map data into postgis, but that can be a follow-up task.