# Deployment ## Versioning rule - The version number recorded in this file (i.e. checked into git) 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`). - Whenever a new image is built and pushed, update the commands below in the same commit, so the checked-in version always matches the published image. ## Publishing (automated) Use `publish.sh` — it reads the current version from this file, bumps the minor, updates this file, builds the image with the version build-arg and pushes it: ```sh ./publish.sh # bump minor of the current version (e.g. 1.10 -> 1.11) ./publish.sh 2.0 # publish an explicit version instead ``` ## Build & push (manual) ```sh docker build --build-arg VERSION=1.10 -t 192.168.2.212:3000/tigeren/metube:1.10 . docker push 192.168.2.212:3000/tigeren/metube:1.10 ``` ## Run ```sh docker compose up -d --build --force-recreate ```