mirror of
https://github.com/lbr77/blog-astro.git
synced 2026-04-09 00:19:12 +00:00
feat: refactor Notion API integration and update Docker configuration
This commit is contained in:
27
Dockerfile
27
Dockerfile
@@ -1,14 +1,27 @@
|
||||
FROM oven/bun:latest AS build
|
||||
FROM oven/bun:1 AS build
|
||||
|
||||
ADD * /app/
|
||||
WORKDIR /app
|
||||
RUN bun install && \
|
||||
bun run astro build
|
||||
COPY package.json bun.lock ./
|
||||
COPY tsconfig.json components.json astro.config.ts ./
|
||||
COPY patches ./patches
|
||||
COPY public ./public
|
||||
COPY src ./src
|
||||
|
||||
ENV ASTRO_ADAPTER=node
|
||||
RUN bun install --frozen-lockfile
|
||||
RUN bun run build
|
||||
|
||||
FROM node:22-bookworm-slim
|
||||
|
||||
FROM node:22-alpine
|
||||
WORKDIR /app
|
||||
COPY --from=build /app/dist ./dist
|
||||
COPY --from=build /app/package.json ./package.json
|
||||
COPY --from=build /app/node_modules ./node_modules
|
||||
COPY --from=build /app/dist ./dist
|
||||
|
||||
ENV NODE_ENV=production
|
||||
ENV HOST=0.0.0.0
|
||||
ENV PORT=3000
|
||||
|
||||
EXPOSE 3000
|
||||
CMD ["node", "dist/server/entry.mjs"]
|
||||
|
||||
CMD ["node", "dist/server/entry.mjs"]
|
||||
|
||||
Reference in New Issue
Block a user