Make nextjs build standalone

This commit is contained in:
2025-10-06 20:30:50 +02:00
parent 7446b2fa3d
commit 63784a56ec
3 changed files with 6 additions and 1 deletions

View File

@@ -1,5 +1,7 @@
FROM node:22-alpine AS build FROM node:22-alpine AS build
ENV HOSTNAME="0.0.0.0"
WORKDIR /app WORKDIR /app
COPY package*.json ./ COPY package*.json ./
@@ -10,4 +12,4 @@ COPY . .
RUN npm run build RUN npm run build
CMD ["npm", "start"] CMD ["node", ".next/standalone/server.js"]

View File

@@ -5,6 +5,8 @@ services:
context: . context: .
dockerfile: Dockerfile dockerfile: Dockerfile
environment: environment:
- NEXTAUTH_URL="https://f1r3wave.photos"
- AUTH_URL="https://f1r3wave.photos"
- AUTH_SECRET="your-super-secret-key-here-generate-with-openssl-rand-base64-32" - AUTH_SECRET="your-super-secret-key-here-generate-with-openssl-rand-base64-32"
- ADMIN_TOKEN="your-admin-secret-token-123" - ADMIN_TOKEN="your-admin-secret-token-123"
ports: ports:

View File

@@ -1,6 +1,7 @@
import type { NextConfig } from "next"; import type { NextConfig } from "next";
const nextConfig: NextConfig = { const nextConfig: NextConfig = {
output: "standalone",
experimental: { experimental: {
serverActions: { serverActions: {
bodySizeLimit: "10gb", bodySizeLimit: "10gb",