chore: make docker
This commit is contained in:
@@ -18,6 +18,8 @@ RUN bun install --frozen-lockfile
|
||||
COPY src ./src
|
||||
COPY tsconfig.json drizzle.config.ts ./
|
||||
|
||||
RUN bun run css:build
|
||||
|
||||
# Production stage
|
||||
FROM oven/bun:1-slim
|
||||
|
||||
@@ -25,7 +27,7 @@ WORKDIR /app
|
||||
|
||||
# Install runtime dependencies
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends ffmpeg \
|
||||
&& apt-get install -y --no-install-recommends ffmpeg ca-certificates \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy from builder
|
||||
@@ -33,14 +35,18 @@ COPY --from=builder /app/node_modules ./node_modules
|
||||
COPY --from=builder /app/src ./src
|
||||
COPY --from=builder /app/package.json ./
|
||||
COPY --from=builder /app/tsconfig.json ./
|
||||
COPY --from=builder /app/drizzle.config.ts ./
|
||||
|
||||
# Set environment variables
|
||||
ENV NODE_ENV=production
|
||||
ENV LOG_LEVEL=info
|
||||
ENV DATABASE_PATH=/data/db.sqlite3
|
||||
ENV WEB_PORT=3000
|
||||
|
||||
# Persist runtime data (SQLite)
|
||||
VOLUME ["/data"]
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
# Run the bot
|
||||
CMD ["bun", "run", "src/index.ts"]
|
||||
|
||||
Reference in New Issue
Block a user