Files
TeleUploader/Dockerfile
T
Claude 1ecab987a6
Deploy FileDrop / deploy (push) Failing after 23s
fix: send non-JPEG images as document instead of photo; fix Dockerfile home.html path
- getFileType: only classify image/jpeg as 'photo'; png/gif/webp → 'document'
  (Telegram Bot API rejects non-JPEG for sendPhoto)
- Dockerfile: copy home.html to dist/ instead of root (import.meta.dir = dist/)
- Update test assertion for getFileType(image/png) → 'document'
2026-07-29 17:15:07 +07:00

33 lines
700 B
Docker

# Stage 1: Builder
FROM oven/bun:alpine AS builder
WORKDIR /usr/src/app
# Install dependencies (devDependencies included for build)
COPY package.json tsconfig.json ./
RUN bun install
# Copy source
COPY src ./src
# Build (lint is run locally before deploy)
RUN bun run build
# Stage 2: Runner
FROM oven/bun:slim AS runner
WORKDIR /usr/src/app
# Copy built files, schema, and package.json
COPY --from=builder /usr/src/app/dist/index.js ./dist/index.js
COPY --from=builder /usr/src/app/dist/migrate.js ./dist/migrate.js
COPY --from=builder /usr/src/app/src/home.html ./dist/home.html
COPY schema.sql ./
COPY package.json ./
# Expose port
EXPOSE 3000
# Start server
CMD ["bun", "dist/index.js"]