mirror of
https://github.com/Dokploy/website.git
synced 2026-06-15 20:25:25 +02:00
refactor: update Dockerfile and Next.js configuration for standalone output
- Modified Dockerfile to copy standalone output and static assets for the docs app. - Updated Next.js configuration to enable standalone output mode.
This commit is contained in:
@@ -16,13 +16,9 @@ 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 --legacy /prod/docs
|
||||
|
||||
RUN cp -R /usr/src/app/apps/docs/.next /prod/docs/.next
|
||||
|
||||
FROM base AS dokploy
|
||||
WORKDIR /app
|
||||
@@ -30,11 +26,11 @@ 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
|
||||
# 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 && pnpm start
|
||||
CMD HOSTNAME=0.0.0.0 node apps/docs/server.js
|
||||
|
||||
@@ -5,6 +5,7 @@ const withMDX = createMDX();
|
||||
/** @type {import('next').NextConfig} */
|
||||
const config = {
|
||||
reactStrictMode: true,
|
||||
output: "standalone",
|
||||
images: {
|
||||
remotePatterns: [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user