mirror of
https://github.com/hempyhemp/hh-auto-reply.git
synced 2026-06-08 18:04:57 +00:00
🎨 Изменение(bot-commands): Обновлено отображение списка пропущенных вакансий
This commit is contained in:
13
.dockerignore
Normal file
13
.dockerignore
Normal file
@@ -0,0 +1,13 @@
|
||||
node_modules
|
||||
dist
|
||||
.env
|
||||
.env.*
|
||||
prisma/dev.db
|
||||
prisma/dev.db-journal
|
||||
prisma/migrations/*.db
|
||||
.idea
|
||||
.vscode
|
||||
coverage
|
||||
*.log
|
||||
.cache
|
||||
.tmp
|
||||
45
Dockerfile
Normal file
45
Dockerfile
Normal file
@@ -0,0 +1,45 @@
|
||||
# ── Stage 1: build ─────────────────────────────────────────────────────────────
|
||||
FROM node:22-slim AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# build tools for native modules
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
python3 make g++ \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY package.json yarn.lock .yarnrc.yml ./
|
||||
RUN corepack enable
|
||||
|
||||
RUN yarn install --immutable
|
||||
|
||||
COPY tsconfig.json ./
|
||||
COPY prisma ./prisma
|
||||
COPY src ./src
|
||||
|
||||
RUN yarn prisma generate && yarn build
|
||||
|
||||
# ── Stage 2: runtime ───────────────────────────────────────────────────────────
|
||||
FROM node:22-slim AS runner
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN corepack enable
|
||||
|
||||
COPY --from=builder /app/node_modules ./node_modules
|
||||
COPY --from=builder /app/dist ./dist
|
||||
COPY --from=builder /app/prisma ./prisma
|
||||
COPY package.json yarn.lock .yarnrc.yml ./
|
||||
|
||||
# install Chromium + all system dependencies for Playwright
|
||||
RUN npx playwright install --with-deps chromium
|
||||
|
||||
# SQLite data lives on a volume so it survives container restarts
|
||||
RUN mkdir -p /data
|
||||
ENV DATABASE_URL="file:/data/dev.db"
|
||||
ENV NODE_ENV=production
|
||||
|
||||
VOLUME ["/data"]
|
||||
|
||||
# apply pending migrations then start the bot
|
||||
CMD ["sh", "-c", "npx prisma migrate deploy && node dist/index.js"]
|
||||
Reference in New Issue
Block a user