Move stored data to a volume

Fix the silly data wipe on re-deployment by writing the data to a
volume instead of the ephemeral container filesystem.
This commit is contained in:
Hornwitser 2025-03-05 18:42:56 +01:00
parent 6ea3567c94
commit 5cc310384e
5 changed files with 7 additions and 97 deletions

View file

@ -17,15 +17,15 @@ COPY . .
RUN corepack enable pnpm && pnpm run build
# Production image, copy all the files and run next
# Production image, copy all the files and run Nuxt
FROM base AS runner
WORKDIR /app
ENV NODE_ENV=production
COPY --from=builder /app/.output ./
COPY --chown=node:node schedule.json .
RUN echo '[]' > push-subscriptions.json && chown node:node push-subscriptions.json
RUN install --owner=node --group=node --directory data
VOLUME [ "/app/data" ]
USER node