This commit is contained in:
Mackie 2026-05-22 20:52:58 +08:00
parent 210c982e57
commit 2b189f070e
3 changed files with 5 additions and 5 deletions

View file

@ -8,7 +8,7 @@ DATABASE_URL=mongodb://127.0.0.1/your-database-name
PAYLOAD_SECRET=YOUR_SECRET_HERE
# Used to configure CORS, format links and more. No trailing slash
NEXT_PUBLIC_SERVER_URL=http://localhost:3001
NEXT_PUBLIC_SERVER_URL=http://localhost:3002
# Secret used to authenticate cron jobs
CRON_SECRET=YOUR_CRON_SECRET_HERE

View file

@ -16,7 +16,7 @@ COPY . .
ENV NEXT_TELEMETRY_DISABLED=1
ENV DATABASE_URI="mongodb://localhost:27017/build-placeholder"
ENV PAYLOAD_SECRET="build-time-placeholder"
ENV NEXT_PUBLIC_SERVER_URL="http://localhost:3000"
ENV NEXT_PUBLIC_SERVER_URL="http://localhost:3002"
ENV NODE_ENV=production
RUN pnpm payload generate:types || echo "Skipped"
@ -37,8 +37,8 @@ COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
USER nextjs
EXPOSE 3001
ENV PORT=3001
EXPOSE 3002
ENV PORT=3002
ENV HOSTNAME=0.0.0.0
CMD ["node", "server.js"]

View file

@ -7,7 +7,7 @@ const __filename = fileURLToPath(import.meta.url)
const dirname = path.dirname(__filename)
import { redirects } from './redirects'
const NEXT_PUBLIC_SERVER_URL = process.env.NEXT_PUBLIC_SERVER_URL || 'http://localhost:3001'
const NEXT_PUBLIC_SERVER_URL = process.env.NEXT_PUBLIC_SERVER_URL || 'http://localhost:3002'
const nextConfig: NextConfig = {
output: 'standalone',