# MeTube project notes

## Versioning rule

- The version number checked into git (recorded in `DEPLOY.md`) is the **current online version** — the version of the latest published Docker image.
- When any changes are made, the new Docker image version must **bump the minor number of the latest git version** (e.g. latest is `1.9` → new image is `1.10`).
- The version is injected into the image at build time via `--build-arg VERSION=<version>` (exposed as `METUBE_VERSION` and served by the `/version` endpoint).
- Whenever a new image is built and pushed, update the build/push commands in `DEPLOY.md` in the same commit so the checked-in version always matches the published image.
- Use `./publish.sh` to publish: it bumps the minor version from `DEPLOY.md`, updates `DEPLOY.md`, builds and pushes the image. Pass an explicit version (`./publish.sh 2.0`) to override. Do not run it unless the user asked to publish.

## UI

- Angular app in `ui/`. Build with `cd ui && npm run build`. The Docker image builds the UI itself (see `Dockerfile`), so no need to commit `ui/dist`.
