Let's talk about CI/CD.
This article is the direct continuation of this topic - Kotlin + Spring + Vue: CI/CD after this step - Kotlin + Spring + Vue: Migration from Maven to Gradle. Here we review what is required to be changed after migration to Gradle for successful Heroku deployment.
This article is the direct continuation of this topic - Kotlin + Spring + Vue: CI/CD after this step - Kotlin + Spring + Vue: Migration from Maven to Gradle. Here we review what is required to be changed after migration to Gradle for successful Heroku deployment.
Procfile
Of course, our Procfile have to be changed. We should provide the instructions to Heroku what exactly is needed to run:
web: java -Dserver.port=$PORT -jar backend/build/libs/backend-0.0.1-SNAPSHOT.jar
Environment Variables
Heroku is able to determine the kind of application (Spring Boot, for example) and execute the relevant building instructions. But our root project is not a Spring Boot application. If we leave everything as is, Heroku asks us to define stage task, but that's not an easy way.
It's better to specify
GRADLE_TASK
variable with value build
(your application -> Settings -> Reveal Config Vars):reCAPTCHA
And now one thing left: we have to update our reCAPTCHA site, if we use a new domain for our application. You can find the instruction here: Kotlin + Spring + Vue: Spam Protection (reCAPTCHA). If you already did that, so just:
- Create new reCAPTCHA for the new domain
- Update Heroku environment variables:
GOOGLE_RECAPTCHA_KEY_SITE
andGOOGLE_RECAPTCHA_KEY_SECRET
- Update Key Site in your frontend subproject
Comments
Post a Comment