컨텍스트 경로를 현재 Grails build pack으로 설정할 수 있다고 생각하지 않습니다. 기분이 좋다면 빌드 팩을 포크하고 해킹하여 설정 컨텍스트를 지원할 수 있습니다 (빌드 팩에 대한 자세한 내용은 build pack doc 참조).
또 다른 옵션은 Grails 앱을 로컬로 WAR 파일에 빌드하고 WAR deployment을 사용하여 WAR 파일을 배포하는 것입니다. WAR 배포 프로세스에서는 webapp-runner 유틸리티를 사용하여 Tomcat에서 앱을 실행하며 컨텍스트 경로 구성을 지원합니다. 여기에 웹 애플리케이션 주자 7.0.22.3에 대한 도움말 출력이다 (I가 설치되어 있어야 무슨 일이 있었는지는 약간 오래된 수 있습니다) :
Tomcat Runner runs a Java web application that is represented as an exploded war in a Tomcat container Usage: java -jar tomcat-runner.jar [arguments...] path/to/webapp Arguments: --session-timeout The number of minutes of inactivity before a user's session is timed out
--port The port that the server will accept http requests on
--context_xml The parth to the context xml to use
--path context path (default is /)
--session_manager session store to use (valid options are 'memcache')
--session_manager_operation_timeoutoperation timeout for the memcached session manager. (default is 5000ms)
--session_manager_locking_modeSession locking mode for use with memcache session store. (default is all)
--session_manager_ignore_patternRequest pattern to not track sessions for. Valid only with memcache session store. (default is '.*\.(png|gif|jpg|css|js)$'
으로는 WAR deploy doc 설명, 당신을위한 웹 애플리케이션 주자 옵션을 설정할 수 있습니다 WEBAPP_RUNNER_OPTS
config var를 사용하는 웹 애플리케이션.
불행히도 이것은 Heroku에서 쓰인 것처럼 작동하지 않는 것 같습니다. 나는/web-app/WEB-INF/jetty-web.xml 파일을 만들고 위의 내용을 붙여 넣으면 prod 파일에'/ xyz'를 404 개 붙이게됩니다. Heroku가 응용 프로그램을 시작할 때'jetty-web.xml' 파일을보고 사용하는지 궁금합니다. –