fix: Add ASTRO_DB_REMOTE_URL and --remote flag to Docker build command

This commit is contained in:
Kunthawat Greethong
2026-03-09 20:47:12 +07:00
parent 6111b0e6ee
commit 891bb3e96e

View File

@@ -3,7 +3,7 @@ WORKDIR /app
COPY package*.json ./ COPY package*.json ./
RUN npm ci RUN npm ci
COPY . . COPY . .
RUN npm run build RUN ASTRO_DB_REMOTE_URL=file:./data/consent.db npx astro build --remote
FROM node:20-alpine FROM node:20-alpine
WORKDIR /app WORKDIR /app
@@ -11,6 +11,7 @@ COPY package*.json ./
RUN npm install --production RUN npm install --production
COPY --from=builder /app/dist ./dist COPY --from=builder /app/dist ./dist
COPY --from=builder /app/db ./db COPY --from=builder /app/db ./db
COPY --from=builder /app/data ./data
RUN apk add --no-cache sqlite-libs RUN apk add --no-cache sqlite-libs