Skip to content

πŸ“š The open-source, offline-first Notion, Obsidian & Confluence alternative. Advanced Markdown, multi-tenant teams, OIDC/SSO, and local S3 backups. Deploy in one command.

918 B
Raw Blame
# Frontend Dockerfile for Alexandrie - Runtime build with build-time config
FROM node:24-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

WORKDIR /app

# Copy package files and install dependencies as root
COPY package.json bun.lock ./
RUN bun install


# Switch to app user
USER appuser

# Expose port
EXPOSE 8200

# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \
    CMD curl -f http://localhost:8200/ || exit 1

# 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=""

CMD ["bun", "run", "dev:host"]