revert changes made to run on cPanel

This commit is contained in:
Francisco Solla 2026-03-15 15:28:48 -03:00
parent 0695ae8082
commit a2ad8f7e20
5 changed files with 3 additions and 44 deletions

View file

@ -1,5 +1,4 @@
DATABASE_URL=postgresql://USER:PASSWORD@HOST:5432/DATABASE
PAYLOAD_SECRET=YOUR_SECRET_HERE
BLOB_READ_WRITE_TOKEN=YOUR_BLOB_TOKEN_HERE
NEXT_BASE_PATH=/mandato
NEXT_PUBLIC_SITE_URL=https://jorgesolla.com.br

26
app.js
View file

@ -1,26 +0,0 @@
import { createServer } from 'node:http'
import next from 'next'
const dev = process.env.NODE_ENV !== 'production'
const port = Number(process.env.PORT) || 3000
const host = process.env.HOST || '127.0.0.1'
const app = next({
dev,
hostname: host,
port,
})
const handle = app.getRequestHandler()
app
.prepare()
.then(() => {
createServer((req, res) => handle(req, res)).listen(port, host, () => {
console.log(`> Ready on http://${host}:${port}`)
})
})
.catch((error) => {
console.error('Failed to start Next.js server', error)
process.exit(1)
})

View file

@ -1 +0,0 @@
(() => import('./app.js'))()

View file

@ -1,13 +1,9 @@
import { withPayload } from '@payloadcms/next/withPayload'
/** @type {import('next').NextConfig} */
const basePath = process.env.NEXT_BASE_PATH || ''
const assetPrefix = process.env.NEXT_ASSET_PREFIX || undefined
const allowedImageHost = process.env.NEXT_PUBLIC_SITE_URL || 'https://jorgesolla.com.br'
const nextConfig = {
basePath,
assetPrefix,
images: {
remotePatterns: [new URL(`${allowedImageHost}/**`)],
},

View file

@ -1,14 +1,11 @@
import { SocialLinks } from '@/components/socialLinks'
import { WhatsappForm } from '@/components/WhatsappForm'
import Image from 'next/image'
export default function Page() {
const basePath = process.env.NEXT_BASE_PATH || ''
return (
<main
className="w-screen h-screen bg-center bg-cover flex flex-col items-center justify-center"
style={{ backgroundImage: `url(${basePath}/BG.jpg)` }}
style={{ backgroundImage: 'url(/BG.jpg)' }}
>
<div className="flex flex-col max-w-300 gap-12">
<div className="relative flex flex-col gap-5">
@ -31,20 +28,14 @@ export default function Page() {
<WhatsappForm classname="flex-1 w-[40%]" />
<Image
className="flex-[1.8] -mx-10 absolute top-1/2 -translate-y-[50%] right-0 w-[67%]"
src={`${basePath}/LULA_E_SOLLA.png`}
src="/LULA_E_SOLLA.png"
width={956}
height={948}
alt=""
/>
</div>
<div className="relative flex flex-col items-center gap-0">
<Image
src={`${basePath}/LOGO_SOLLA_BRANCO.svg`}
width={430}
height={300}
alt=""
className="-my-30"
/>
<Image src="/LOGO_SOLLA_BRANCO.svg" width={430} height={300} alt="" className="-my-30" />
<p className="text-center">
<strong>Seus dados estão seguros.</strong> Utilizamos suas informações apenas para
contato e envio de conteúdos relacionados.