deploy: staging single-container via host caddy-docker-proxy

- drop caddy/SSL in container (staging only): api service gets caddy labels,
  host caddy terminates TLS and routes ${BRANCH}.it-smi.jt4d.ru.net -> :5000
- simplify Dockerfile to single-stage, healthcheck -> /, .dockerignore
- pin packageManager yarn@4.18.0 and use corepack: project is Yarn 4 (berry
  lockfile), base image and CI runner ship Yarn 1 and failed on install
- rewrite ci.yaml/cleanup.yaml for flat project (single api image, no Nx)
This commit is contained in:
arswarog committed 2026-11-16 17:26:19 +03:00
1 parent 643e8521eb
commit 6798532fec
6 files changed
+246

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
FROM git.jt4d.ru/jt4d/node:24-alpine
ENV COREPACK_ENABLE_DOWNLOAD_PROMPT=0
WORKDIR /app
RUN corepack enable
COPY package.json yarn.lock .yarnrc.yml ./
RUN yarn install --immutable && yarn cache clean
COPY ./dist /app
RUN apk add --no-cache curl
ENV NODE_ENV=production
ENV PORT=5000
EXPOSE 5000
HEALTHCHECK --interval=30s --timeout=5s --retries=3 --start-period=15s \
CMD curl -f http://localhost:5000/ || exit 1
CMD ["node", "main.js"]