- 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)
25 lines
451 B
Docker
25 lines
451 B
Docker
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"]
|