From 30d118027c341f60202f5f38350692ad95dfb3f6 Mon Sep 17 00:00:00 2001 From: mzaxd Date: Sun, 19 Apr 2026 17:52:43 +0800 Subject: [PATCH] chore: add dokploy standalone runtime deployment --- .dockerignore | 8 +++++++- Dockerfile.runtime | 14 ++++++++++++++ next.config.js | 1 + prisma/schema.prisma | 1 + 4 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 Dockerfile.runtime diff --git a/.dockerignore b/.dockerignore index 3ac387a..212dccb 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,6 +1,12 @@ .env.local .git -.next +.next/* +!.next/standalone +!.next/standalone/** +!.next/standalone/node_modules +!.next/standalone/node_modules/** +!.next/static +!.next/static/** .planning node_modules tsconfig.tsbuildinfo diff --git a/Dockerfile.runtime b/Dockerfile.runtime new file mode 100644 index 0000000..db52966 --- /dev/null +++ b/Dockerfile.runtime @@ -0,0 +1,14 @@ +FROM node:22-bookworm + +ENV NODE_ENV="production" +ENV HOSTNAME="0.0.0.0" +ENV PORT="3000" + +WORKDIR /app + +COPY .next/standalone ./ +COPY .next/static ./.next/static + +EXPOSE 3000 + +CMD ["node", "server.js"] diff --git a/next.config.js b/next.config.js index 4269219..af85998 100644 --- a/next.config.js +++ b/next.config.js @@ -4,6 +4,7 @@ const withNextIntl = createNextIntlPlugin('./src/i18n/request.ts') /** @type {import('next').NextConfig} */ const nextConfig = { + output: 'standalone', images: { remotePatterns: [ { hostname: 'localhost' }, diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 59ea62a..9b9aab7 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -1,5 +1,6 @@ generator client { provider = "prisma-client-js" + binaryTargets = ["native", "debian-openssl-3.0.x", "debian-openssl-1.1.x"] previewFeatures = ["postgresqlExtensions"] }