Files
coolify-docs/Dockerfile
T
Andras Bacsai a64450ae9d feat(platform): migrate docs from VitePress to Fumadocs + TanStack Start
Replace VitePress/Vue stack with Fumadocs MDX, TanStack Start, React 19,
and Vite. Migrate all documentation content to MDX under content/docs/.
Add full src/ app with React components, routing, search, and API page.

Remove Korrektly integration from CI/CD workflows, Dockerfile, and env
vars. Update build pipeline to output to .output/public instead of
docs/.vitepress/dist.
2026-05-06 12:08:05 +02:00

64 lines
1.7 KiB
Docker

# Stage 1: Build Stage (oven/bun:1.3.6-alpine)
FROM oven/bun:1.3.6-alpine AS builder
ARG VITE_ANALYTICS_DOMAIN=coolify.io/docs
ARG VITE_SITE_URL=https://coolify.io/docs/
ENV VITE_ANALYTICS_DOMAIN=${VITE_ANALYTICS_DOMAIN}
ENV VITE_SITE_URL=${VITE_SITE_URL}
RUN apk add --no-cache nodejs npm
# Set working directory and copy necessary files
WORKDIR /app
# Copy package files first for better caching
COPY package.json bun.lock ./
# Install Git and dependencies
RUN --mount=type=cache,target=/var/cache/apk \
apk update && apk add --no-cache git
# Install dependencies with cache
RUN --mount=type=cache,target=/root/.bun \
--mount=type=cache,target=/root/.cache/bun \
bun install
# Copy only necessary files for build
COPY config/ ./config/
COPY public/ ./public/
COPY src/ ./src/
COPY docs/ ./docs/
COPY nginx/ ./nginx/
COPY scripts/ ./scripts/
COPY env.d.ts .
COPY source.config.ts .
COPY tsconfig*.json ./
COPY vite.config.ts .
# Copy git history for lastUpdated timestamps
COPY .git/ ./.git/
# Build with cache
RUN --mount=type=cache,target=/root/.bun \
--mount=type=cache,target=/root/.cache/bun \
--mount=type=cache,target=/app/.source \
bun run build
# Stage 2: NGINX Unprivileged Setup (1.29.3-alpine-slim, ARM64)
FROM nginxinc/nginx-unprivileged:1.29.3-alpine-slim AS final
# Set working directory for NGINX and copy built files from the build stage
WORKDIR /usr/share/nginx/html
COPY --from=builder /app/.output/public /usr/share/nginx/html
# Copy custom NGINX configuration
COPY nginx/nginx.conf /etc/nginx/nginx.conf
# Copy custom redirects NGINX configuration
COPY nginx/redirects.conf /etc/nginx/conf.d/redirects.conf
# Expose port 80
EXPOSE 80
# Start NGINX
CMD ["nginx", "-g", "daemon off;"]