I have a pretty basic JHipster-generated application (Spring Boot + React)
Node version is v20.15.0
, java version is 21
.
Locally, simply running ./mvnw
works, my app starts correctly, I can connect and see my database. The problem is I can't deploy it via Koyeb. The reason this question is tagged as heroku
and not koyeb
is because I am pretty sure that koyeb
uses parts of heroku
's buildpack detector under the hood and there is no tag for koyeb
.
I have a Procfile
like so:
web: java $JAVA_OPTS -Xmx256m -jar build/libs/*.jar --spring.profiles.active=prod,koyeb
My application-koyeb
is this:
eureka:
instance:
hostname: formatted-for-post.koyeb.app
non-secure-port: 8080
prefer-ip-address: false
spring:
datasource:
type: com.zaxxer.hikari.HikariDataSource
url: ${JDBC_DATABASE_URL}
username: ${JDBC_DATABASE_USERNAME}
password: ${JDBC_DATABASE_PASSWORD}
hikari:
maximumPoolSize: 8
server:
port: ${PORT:8080}
I have added a post-build command inside of Koyeb to try and make it work (but it doesn't, with or without this command):
chmod +x ./mvnw && ./mvnw -Pprod clean verify
If I don't include this post-build command, Koyeb reports at deployment stage that java command is not found
.
If I do include the post-build command, Koyeb fails at build stage saying
The JAVA_HOME environment variable is not defined correctly,
this environment variable is needed to run this program.
I think that the problem is that heroku/jvm or anything of the sorts is not getting installed at all.
I have a pom.xml
file, a system.properties
file, mvnw
file etc. in my root folder. Sooo, how come the detector isn't detecting? I think the koyeb detector uses parts of the heroku detector.
I have already tried to debug this myself by running:
pack build -B koyeb/builder formatted
on my local machine. The process gets stuck at the detection stage. No errors getting reported.
So, my question is why buildpack java/jvm
not automatically assigned as a detected needed buildpack, but most importantly, how do I understand what's actually going wrong here?
Thank you in advance for any advice you might have!
Turns out multi-language build packs are not supported in Koyeb.
This feedback page is used for people of the community to vote for adding this support in the future, but it is not possible at the current moment in time.