1package.json
next start 가 PORT 를 쓰도록 -p 로 넘깁니다.
json"scripts": { "build": "next build", "start": "next start -H 0.0.0.0 -p ${PORT:-8080}" }2배포 방법 (셋 중 하나)
① GitHub 연결: 프로젝트 → 서비스 추가 → GitHub 저장소 (push 하면 자동 배포) ② 이 폴더 그대로: oc up --wait (Dockerfile 이 없어도 언어를 감지해 빌드) ③ 콘솔에서 폴더 · zip 올리기: 서비스 추가 → 소스 올리기
bashoc login oc project create my-app --link oc up --wait3환경 변수
NEXT_PUBLIC_* 는 빌드 때 들어가므로 바꾼 뒤에는 다시 배포하세요.
bashoc variables set NEXT_PUBLIC_API_URL=https://api.example.com oc redeploy --wait