build: prepare Next.js standalone output and Payload Postgres adapter for Coolify deployment
This commit is contained in:
@@ -0,0 +1,12 @@
|
|||||||
|
node_modules
|
||||||
|
.next
|
||||||
|
.git
|
||||||
|
.env
|
||||||
|
.env.local
|
||||||
|
dev.db
|
||||||
|
*.db
|
||||||
|
.DS_Store
|
||||||
|
npm-debug.log*
|
||||||
|
.vscode
|
||||||
|
.gemini
|
||||||
|
.agents
|
||||||
+18
-1
@@ -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=
|
||||||
|
|||||||
@@ -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 [
|
||||||
|
|||||||
@@ -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),
|
||||||
|
|||||||
Reference in New Issue
Block a user