-sbt plugin을 사용하는게 쉽다. gradle은 하지 말자. 아래 링크 참조.

https://devcenter.heroku.com/articles/deploying-scala-and-play-applications-with-the-heroku-sbt-plugin

플러그인 버전은 git repo 방문하여 맞는 버전으로 바꾼다.



-자원 사용 시 conf 폴더 밑에 둔다.

빌드하면 conf 폴더가 헤로쿠에서는 /app/target/universal/stage/conf/ 에 존재한다.

이 경로를 운영 conf 파일에서 사용한다.

예:

data{

root="/app/target/universal/stage/conf/xxx/"

}



-play.filters.hosts.allowed는 다음과 같이 .herokuapp.com을 추가한다.

play.filters {

hosts.allowed = [".herokuapp.com"]



-play.filters.cors.allowedOrigins에 

https://morning-bayou-41273.herokuapp.com 와 같이 origin 전체를 추가해준다.







-헤로쿠 서버 들어가기

heroku run bash -a xxx-111

로그 보기

heroku logs -a xxx-111 -n 1500

빌드하기 -  앱 로컬 폴더에서 

sbt stage deployHeroku

Posted by 타다키치
,