feat: add Docker support with demo mode and database reset functionality
This commit is contained in:
1 parent
75af38a4b6
commit
373b9278d1
12 files changed
+248
-5
No files matched your search
+24
@@ -0,0 +1,24 @@
|
||||
# SPDX-FileCopyrightText: 2026 Paul Schoeneck
|
||||
#
|
||||
# SPDX-License-Identifier: AGPL-3.0-only AND LicenseRef-KIBU-Additional-Terms
|
||||
|
||||
FROM node:22-bookworm-slim AS build
|
||||
WORKDIR /app
|
||||
ENV NEXT_TELEMETRY_DISABLED=1
|
||||
COPY package.json package-lock.json ./
|
||||
RUN npm ci
|
||||
COPY . .
|
||||
RUN sed -i 's/\r$//' scripts/docker-entrypoint.sh && npm run build
|
||||
|
||||
FROM node:22-bookworm-slim AS runtime
|
||||
WORKDIR /app
|
||||
ENV NODE_ENV=production NEXT_TELEMETRY_DISABLED=1 PORT=3000
|
||||
LABEL org.opencontainers.image.title="KIBU" \
|
||||
org.opencontainers.image.source="https://git.voidcube.de/pixo2000/KIBU" \
|
||||
org.opencontainers.image.licenses="AGPL-3.0-only AND LicenseRef-KIBU-Additional-Terms"
|
||||
COPY --from=build --chown=node:node /app /app
|
||||
USER node
|
||||
EXPOSE 3000
|
||||
HEALTHCHECK --interval=10s --timeout=5s --start-period=60s --retries=6 \
|
||||
CMD node -e "fetch('http://127.0.0.1:'+process.env.PORT+'/login').then(r=>{if(!r.ok)process.exit(1)}).catch(()=>process.exit(1))"
|
||||
ENTRYPOINT ["sh", "scripts/docker-entrypoint.sh"]
|
||||
Reference in new issue
Block a user