docker-compose: fix build

This commit is contained in:
vchikalkin 2025-08-15 14:09:38 +03:00
parent 39fb873867
commit 0b6c4427c9
5 changed files with 4051 additions and 12 deletions

View File

@ -22,6 +22,21 @@ RUN turbo prune --scope=${PROJECT} --docker
FROM base AS builder
WORKDIR /app
# Install build dependencies for native modules (canvas)
RUN apk add --no-cache \
python3 \
make \
g++ \
cairo-dev \
jpeg-dev \
pango-dev \
musl-dev \
giflib-dev \
pixman-dev \
pangomm-dev \
libjpeg-turbo-dev \
freetype-dev
COPY --from=pruner /app/out/json/ .
COPY --from=pruner /app/out/pnpm-lock.yaml ./pnpm-lock.yaml
COPY --from=pruner /app/out/pnpm-workspace.yaml ./pnpm-workspace.yaml
@ -40,6 +55,17 @@ RUN rm -rf ./**/*/src
FROM alpine AS runner
ARG PROJECT
# Install runtime dependencies for canvas
RUN apk add --no-cache \
cairo \
jpeg \
pango \
giflib \
pixman \
pangomm \
libjpeg-turbo \
freetype
RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 botuser
USER botuser

View File

@ -23,11 +23,12 @@
"@grammyjs/i18n": "^1.1.2",
"@grammyjs/parse-mode": "^2.2.0",
"@grammyjs/types": "^3.21.0",
"@repo/typescript-config": "workspace:*",
"@tobyg74/tiktok-api-dl": "^1.3.4",
"@types/node": "catalog:",
"grammy": "^1.37.0",
"pino": "^9.9.0",
"pino-pretty": "^13.1.1",
"pino": "^9.9.0",
"tsup": "^8.5.0",
"typescript": "catalog:",
"zod": "catalog:"
@ -35,7 +36,6 @@
"devDependencies": {
"@repo/eslint-config": "workspace:*",
"@repo/lint-staged-config": "workspace:*",
"@repo/typescript-config": "workspace:*",
"dotenv-cli": "catalog:",
"lint-staged": "catalog:",
"tsx": "^4.20.4"

View File

@ -12,6 +12,6 @@ const bot = createBot({
process.once('SIGINT', () => bot.stop());
process.once('SIGTERM', () => bot.stop());
await bot.start({
bot.start({
onStart: ({ username }) => logger.info(`Bot ${username} started`),
});

View File

@ -6,7 +6,7 @@
"alwaysStrict": true,
"strict": true,
"moduleResolution": "Node",
"module": "esnext",
"module": "CommonJS",
"paths": {
"@/*": ["./src/*"]
}

4029
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff