mirror of
https://github.com/Dokploy/website.git
synced 2026-06-15 20:25:25 +02:00
- Modified Dockerfile to copy standalone output and static assets for the docs app. - Updated Next.js configuration to enable standalone output mode.
37 lines
984 B
Docker
37 lines
984 B
Docker
FROM node:24.4-alpine AS base
|
|
ENV PNPM_HOME="/pnpm"
|
|
ENV PATH="$PNPM_HOME:$PATH"
|
|
RUN corepack enable
|
|
|
|
FROM base AS build
|
|
COPY . /usr/src/app
|
|
WORKDIR /usr/src/app
|
|
|
|
|
|
# Install dependencies
|
|
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --filter=./apps/docs --frozen-lockfile
|
|
|
|
# Generate OpenAPI documentation from apps/docs/public/openapi.json
|
|
RUN pnpm --filter=./apps/docs run build:docs
|
|
|
|
# Generate templates
|
|
RUN pnpm --filter=./apps/docs run generate-templates
|
|
|
|
ENV NODE_ENV=production
|
|
RUN pnpm --filter=./apps/docs run build
|
|
|
|
FROM base AS dokploy
|
|
WORKDIR /app
|
|
|
|
# Set production
|
|
ENV NODE_ENV=production
|
|
|
|
# Copy standalone output (includes all traced dependencies)
|
|
COPY --from=build /usr/src/app/apps/docs/.next/standalone ./
|
|
# Copy static assets and public files
|
|
COPY --from=build /usr/src/app/apps/docs/.next/static ./apps/docs/.next/static
|
|
COPY --from=build /usr/src/app/apps/docs/public ./apps/docs/public
|
|
|
|
EXPOSE 3000
|
|
CMD HOSTNAME=0.0.0.0 node apps/docs/server.js
|