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:
1 parent
7d8a583f11
commit
25de4ad823
6 files changed
+246
No files matched your search
+24
@@ -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"]
|
||||
Reference in new issue
Block a user