Add Docker build + GitHub Actions CI/CD (test -> build -> publish to GHCR)

This commit is contained in:
kromskii2 committed 2026-09-10 15:02:53 +07:00
1 parent 3ba969dbf4
commit 20c3fb1c06
7 files changed
+208 -1

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
FROM node:22-alpine
ENV NODE_ENV=production
WORKDIR /app
# Сначала зависимости — слой кешируется
COPY package.json package-lock.json ./
RUN npm ci --omit=dev && npm cache clean --force
# Затем код
COPY index.js ./
COPY lib ./lib
# Нерут-пользователь
RUN addgroup -S bot && adduser -S -D -G bot bot
USER bot
CMD ["node", "index.js"]