- self-updater.js: polls for new versions, downloads/verifies tarballs, triggers host-side rebuild via systemd path unit - dashcaddy-update.sh + systemd units: host-side container rebuild with automatic rollback on health check failure - 7 new /api/v1/system/* endpoints for version info, update check/apply, rollback, and update history - Frontend: DashCaddy tab in Updates modal with version display, changelog, update button, rollback, and notification dot - install.sh: updater service installation, volume mounts, env vars - build-release.sh + webhook-handler.js: release server pipeline (Gitea webhook → build tarball → deploy to get.dashcaddy.net) - Dockerfile: DASHCADDY_COMMIT build arg → VERSION file - Version bump to 1.1.0 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
29 lines
741 B
Docker
29 lines
741 B
Docker
FROM node:20-alpine
|
|
|
|
WORKDIR /app
|
|
|
|
# Install OpenSSL for certificate generation
|
|
RUN apk add --no-cache openssl
|
|
|
|
COPY package*.json ./
|
|
RUN npm install --production
|
|
|
|
COPY *.js ./
|
|
COPY routes/ ./routes/
|
|
COPY openapi.yaml ./
|
|
|
|
ARG DASHCADDY_COMMIT=unknown
|
|
RUN echo "${DASHCADDY_COMMIT}" > VERSION
|
|
|
|
# Note: Running as root because container needs Docker socket access
|
|
# (which is root-equivalent anyway). Socket access required for container management.
|
|
|
|
EXPOSE 3001
|
|
|
|
STOPSIGNAL SIGTERM
|
|
|
|
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
|
|
CMD node -e "require('http').get('http://localhost:3001/health', (r) => { process.exit(r.statusCode === 200 ? 0 : 1); }).on('error', () => process.exit(1))"
|
|
|
|
CMD ["node", "server.js"]
|