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
|
# Generate templates
|
||||||
RUN pnpm --filter=./apps/docs run generate-templates
|
RUN pnpm --filter=./apps/docs run generate-templates
|
||||||
# Deploy only the dokploy app
|
|
||||||
|
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
RUN pnpm --filter=./apps/docs run build
|
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
|
FROM base AS dokploy
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
@@ -30,11 +26,11 @@ WORKDIR /app
|
|||||||
# Set production
|
# Set production
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
|
|
||||||
# Copy only the necessary files
|
# Copy standalone output (includes all traced dependencies)
|
||||||
COPY --from=build /prod/docs/.next ./.next
|
COPY --from=build /usr/src/app/apps/docs/.next/standalone ./
|
||||||
COPY --from=build /prod/docs/public ./public
|
# Copy static assets and public files
|
||||||
COPY --from=build /prod/docs/package.json ./package.json
|
COPY --from=build /usr/src/app/apps/docs/.next/static ./apps/docs/.next/static
|
||||||
COPY --from=build /prod/docs/node_modules ./node_modules
|
COPY --from=build /usr/src/app/apps/docs/public ./apps/docs/public
|
||||||
|
|
||||||
EXPOSE 3000
|
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} */
|
/** @type {import('next').NextConfig} */
|
||||||
const config = {
|
const config = {
|
||||||
reactStrictMode: true,
|
reactStrictMode: true,
|
||||||
|
output: "standalone",
|
||||||
images: {
|
images: {
|
||||||
remotePatterns: [
|
remotePatterns: [
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user