-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
'코딩 > Play' 카테고리의 다른 글
akka application.conf 설정과 빌드 후 play 엡에서 jar 파일을 쓸때 (0) | 2018.07.26 |
---|---|
play에서 환경 마다 다른 conf 파일 쓰기 (0) | 2018.07.25 |
ajax 호출 시 Access-Control-Allow-Origin과 cookie (0) | 2018.07.23 |
Play - Vue에서 google signin 적용 (0) | 2018.07.05 |
Play - strict-origin-when-cross-origin (0) | 2018.07.05 |