api: приложение NestJS и e2e-тесты
Каркас api: NestJS со сборкой через webpack, health-контроллер с версией и статусом БД, Dockerfile, тесты Vitest и e2e-тесты на Jest.
This commit is contained in:
1 parent
94e5e09218
commit
94f9b06527
27 files changed
+791
No files matched your search
@@ -0,0 +1,25 @@
|
||||
FROM git.jt4d.ru/jt4d/node:24-alpine AS deps
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY ./package.json ./yarn.lock ./
|
||||
|
||||
RUN yarn install --production --frozen-lockfile && yarn cache clean
|
||||
|
||||
FROM git.jt4d.ru/jt4d/node:24-alpine
|
||||
|
||||
RUN apk add --no-cache tini curl
|
||||
|
||||
COPY --from=deps /app/node_modules /app/node_modules
|
||||
|
||||
COPY ./dist /app
|
||||
|
||||
EXPOSE 5000
|
||||
ENV PORT=5000
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
HEALTHCHECK --interval=30s --timeout=5s --retries=3 --start-period=15s \
|
||||
CMD curl -f http://localhost:5000/api/health || exit 1
|
||||
|
||||
ENTRYPOINT ["/sbin/tini", "--", "node", "main.js"]
|
||||
Reference in new issue
Block a user