| src | ||
| .dockerignore | ||
| Dockerfile | ||
| DockerfileDev | ||
| notes.md | ||
| readme.md | ||
| run.sh | ||
| rundev.sh | ||
archi
we use podman
to develop
run rundev.sh, the site will be available at http://localhost:5173/ and you should be able to modify the code and have it update live
to deploy
run run.sh, it build the production image and starts a container
I tried to make a clean setup, so 2 docker files, one for quick tests during dev the other for production. It is not possible to merge the two dockerfiles because the dev one needs a bind volume to update code from host which we dont want in production
the dev docker uses vite live update feature. to do that, it has a volume bind to it containing the code (src). this allows to be able to modify live without rebuilding the image nore re launching the container.
note on package-lock.json: package lock contains the exact versions of all the dependencie tree, it is generated by npm, but it is important to not regenarate it every time, otherwise a dependency update could fuck the project. The package lock file in src/ is generated by the dev docker, since src is used for bind volume. So when package.json is updated, it is necessary to run the dev docker to update package lock.