📚 The open-source, offline-first Notion, Obsidian & Confluence alternative. Advanced Markdown, multi-tenant teams, OIDC/SSO, and local S3 backups. Deploy in one command.
Vue dockergolangkanbanknowledge-baseknowledge-managementmarkdownnote-takingnotesnotes-appnotionnuxtnuxtjsoffline-firstoidcpwaselfhostedssovuevuejswiki
Fixes with docker: reduce size
Smaug67392117f3187dc7
diff --git a/frontend/Dockerfile b/frontend/Dockerfileindex dded0206..8e4c34f8 100644--- a/frontend/Dockerfile+++ b/frontend/Dockerfile@@ -1,48 +1,27 @@-# Frontend Dockerfile for Alexandrie - Runtime build with build-time config-FROM node:20-alpine--# Install bun-RUN apk add --no-cache curl unzip bash && \- curl -fsSL https://bun.sh/install | bash && \- cp /root/.bun/bin/bun /usr/local/bin/bun && \- chmod +x /usr/local/bin/bun--# Create app user-RUN addgroup -g 1001 -S appgroup && \- adduser -S appuser -G appgroup -u 1001+# ---- Build stage ----+FROM node:20-alpine AS builderWORKDIR /app-# Copy package files and install dependencies as root+# Copier et installer dépendancesCOPY package.json bun.lock ./-RUN bun install+RUN npm install -g bun && bun install-# Copy source code+# Copier le reste du code et builderCOPY . .+RUN bun run build-# Copy entrypoint script-COPY docker-entrypoint.sh /app/docker-entrypoint.sh--# Make script executable and change ownership to app user-RUN chmod +x /app/docker-entrypoint.sh && \- chown -R appuser:appgroup /app--# Switch to app user-USER appuser+# ---- Runtime stage ----+FROM nginx:alpine AS runtime-# Expose port-EXPOSE 8200+# Copier le build statique vers Nginx+COPY --from=builder /app/dist /usr/share/nginx/html-# Health check-HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \- CMD curl -f http://localhost:8200/ || exit 1+# Exposer le port (optionnel, nginx écoute sur 80 par défaut)+EXPOSE 80-# Runtime environment variables - can be overridden at container startup-ENV NODE_ENV=production-ENV PORT=8200-ENV VITE_BASE_API=""-ENV VITE_BASE_CDN=""-ENV NUXT_PUBLIC_BASE_URL=""+# Healthcheck (optionnel)+HEALTHCHECK --interval=30s --timeout=5s CMD wget -qO- http://localhost:80 || exit 1-# Use entrypoint script-ENTRYPOINT ["/app/docker-entrypoint.sh"]\ No newline at end of file+# Démarrage de nginx+CMD ["nginx", "-g", "daemon off;"]