1package.json
Pass the port to next start with -p.
json"scripts": { "build": "next build", "start": "next start -H 0.0.0.0 -p ${PORT:-8080}" }2Deploy (pick one)
① Connect GitHub: Project → Add service → GitHub repository (deploys on push) ② From this folder: oc up --wait (builds even without a Dockerfile) ③ Upload a folder or zip in the console: Add service → Upload source
bashoc login oc project create my-app --link oc up --wait3Environment variables
NEXT_PUBLIC_* values are baked in at build time; redeploy after changing them.
bashoc variables set NEXT_PUBLIC_API_URL=https://api.example.com oc redeploy --wait