I am deploying my web application based on grails 2.5.x to Kubernetes. The application is started by using grails wrapper
. Below is the partial content of Dockerfile
.
COPY --chown=$USERNAME:$USERNAME . $APP_HOME
# Change to the app user.
USER $USERNAME
WORKDIR $APP_HOME
RUN ["chmod", "+x", "grailsw"]
ENTRYPOINT ["/bin/bash", "-lc", "./grailsw prod run-app --non-interactive --stacktrace"]
Because of the complexity and largeness of the application, now it takes about 25 minutes to complete deployment to K8s. It is much longer then the traditional deployment which goes with war file and uploading it to Tomcat web server.
My approaches are
<localRepository>${user.home}/devtools/m2repo</localRepository>
to ~/.m2/settings.xml
, however, my Grails 2.5.5 application still loads libraries from ~/.m2/repository
. I guessed there is a conflict in the integration Grails and maven.Many thanks guys for discussion on this topic!