- Change Dockerfile from nginx (static) to Node.js (SSR) - Add @astrojs/node adapter for SSR mode - Add OUT_DIR=/data for persistent SQLite storage - Add .env.example with persistent storage config - Update README with Easypanel deployment instructions - Database persists across redeployments at /data/astro.db
25 lines
388 B
Docker
25 lines
388 B
Docker
FROM node:20-alpine AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
COPY package*.json ./
|
|
RUN npm install
|
|
COPY . .
|
|
RUN npm run build
|
|
|
|
FROM node:20-alpine AS runner
|
|
|
|
WORKDIR /app
|
|
RUN mkdir -p /data
|
|
|
|
COPY --from=builder /app/dist ./dist
|
|
COPY --from=builder /app/package.json ./
|
|
RUN npm install --omit=dev
|
|
|
|
ENV HOST=0.0.0.0
|
|
ENV PORT=4321
|
|
ENV NODE_ENV=production
|
|
|
|
EXPOSE 4321
|
|
|
|
CMD ["node", "dist/server/entry.mjs"] |