mirror of
https://github.com/Dokploy/website.git
synced 2026-06-15 20:25:25 +02:00
- Added a new script to generate templates from external sources, improving the documentation process. - Integrated new components (Tabs and Tab) into the MDX documentation for better content organization. - Updated the Next.js configuration to allow images from the templates URL. - Implemented batch processing for fetching and generating template files, enhancing performance and error handling. These changes streamline the documentation generation workflow and improve the user experience when accessing template information.
40 lines
1.0 KiB
Docker
40 lines
1.0 KiB
Docker
FROM node:20.9-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
|
|
# Deploy only the dokploy app
|
|
|
|
ENV NODE_ENV=production
|
|
RUN pnpm --filter=./apps/docs run build
|
|
RUN pnpm --filter=./apps/docs --prod deploy /prod/docs
|
|
|
|
RUN cp -R /usr/src/app/apps/docs/.next /prod/docs/.next
|
|
|
|
FROM base AS dokploy
|
|
WORKDIR /app
|
|
|
|
# Set production
|
|
ENV NODE_ENV=production
|
|
|
|
# Copy only the necessary files
|
|
COPY --from=build /prod/docs/.next ./.next
|
|
COPY --from=build /prod/docs/public ./public
|
|
COPY --from=build /prod/docs/package.json ./package.json
|
|
COPY --from=build /prod/docs/node_modules ./node_modules
|
|
|
|
EXPOSE 3000
|
|
CMD HOSTNAME=0.0.0.0 && pnpm start |