build: prepare Next.js standalone output and Payload Postgres adapter for Coolify deployment

This commit is contained in:
MichalC
2026-09-19 11:45:54 +02:00
parent c8193cf166
commit 65994439d7
4 changed files with 35 additions and 6 deletions
+12
View File
@@ -0,0 +1,12 @@
node_modules
.next
.git
.env
.env.local
dev.db
*.db
.DS_Store
npm-debug.log*
.vscode
.gemini
.agents
+18 -1
View File
@@ -1,2 +1,19 @@
DATABASE_URI=file:./dev.db # Baza danych
DATABASE_URI=postgres://user:password@localhost:5432/dbname
# Dla lokalnego dewelopmentu:
# DATABASE_URI=file:./dev.db
# Payload
PAYLOAD_SECRET=YOUR_SECRET_HERE PAYLOAD_SECRET=YOUR_SECRET_HERE
# Opcjonalne: SMTP (do formularzy)
# SMTP_HOST=
# SMTP_PORT=
# SMTP_USER=
# SMTP_PASS=
# SMTP_FROM_ADDRESS=
# SMTP_FROM_NAME=
# Opcjonalne: Turnstile (Cloudflare)
# NEXT_PUBLIC_TURNSTILE_SITE_KEY=
# TURNSTILE_SECRET_KEY=
+1
View File
@@ -7,6 +7,7 @@ const __filename = fileURLToPath(import.meta.url)
const dirname = path.dirname(__filename) const dirname = path.dirname(__filename)
const nextConfig: NextConfig = { const nextConfig: NextConfig = {
output: 'standalone',
async headers() { async headers() {
const { buildSecurityHeaders } = await import('@intecion/ipal-kit') const { buildSecurityHeaders } = await import('@intecion/ipal-kit')
return [ return [
+4 -5
View File
@@ -1,4 +1,5 @@
import { sqliteAdapter } from '@payloadcms/db-sqlite' import { sqliteAdapter } from '@payloadcms/db-sqlite'
import { postgresAdapter } from '@payloadcms/db-postgres'
import { mcpPlugin } from '@payloadcms/plugin-mcp' import { mcpPlugin } from '@payloadcms/plugin-mcp'
import { seoPlugin } from '@payloadcms/plugin-seo' import { seoPlugin } from '@payloadcms/plugin-seo'
import { ipalKit, panelSmtpAdapter } from '@intecion/ipal-kit' import { ipalKit, panelSmtpAdapter } from '@intecion/ipal-kit'
@@ -33,11 +34,9 @@ export default buildConfig({
typescript: { typescript: {
outputFile: path.resolve(dirname, 'payload-types.ts'), outputFile: path.resolve(dirname, 'payload-types.ts'),
}, },
db: sqliteAdapter({ db: process.env.DATABASE_URI?.startsWith('postgres')
client: { ? postgresAdapter({ pool: { connectionString: process.env.DATABASE_URI }, push: false })
url: process.env.DATABASE_URI || '', : sqliteAdapter({ client: { url: process.env.DATABASE_URI || '' } }),
},
}),
sharp, sharp,
localization: { localization: {
locales: i18n.locales.map(l => l.code), locales: i18n.locales.map(l => l.code),