chore(deploy): bake commit version into image and add scripts/deploy.sh

This commit is contained in:
dev
2026-09-23 23:01:36 +03:00
parent a95af7daa7
commit d943b77f58
7 changed files with 91 additions and 3 deletions
+3
View File
@@ -5,6 +5,9 @@ COPY package.json package-lock.json* ./
RUN npm install --omit=dev
COPY . .
RUN mkdir -p uploads certs
ARG GIT_COMMIT=""
ARG GIT_COMMIT_DATE=""
RUN node -e "require('fs').writeFileSync('public/version.json', JSON.stringify({ full: process.env.GIT_COMMIT || '', short: (process.env.GIT_COMMIT || '').slice(0, 7), date: process.env.GIT_COMMIT_DATE || '' }, null, 2))"
RUN set -e; \
V="v$(cut -d. -f1-2 /etc/alpine-release)"; \
try_repo() { \