Running Spring Boot on Dokploy
Hello π ,
Dokploy looks really cool!
I'm trying to run a Spring Boot Application on Dokploy.
First I wanted to use Paketo Buildpacks as this is the default for Spring Boot.
It seems to want to use Java 17:
Using buildpack default Java version 17
I tried setting BP_JAVA_VERSION=21
in my env variables, but this doesn't seem to be a build time variable, as it still tried with Java 17
I then tried with Heroku Buildpacks:
This built successfully but failed on startup:
ERROR: failed to launch: determine start command: when there is no default process a command is required
This should be java -Dserver.port=$PORT $JAVA_OPTS -jar build/libs/*.jar
https://devcenter.heroku.com/articles/deploying-gradle-apps-on-heroku#default-web-process-typeDeploying Gradle Apps on Heroku | Heroku Dev Center
Creating, configuring, deploying and scaling Java applications on Heroku using Gradle.
34 Replies
Using Nixpacks, the same thing happens:
@Siumauricio Happy to help if you need help with the Java stuff
Iβm not familiar with Java spring boot
This is the docs, https://nixpacks.com/docs/providers/java
Do you have a repo to test this?
Java | Nixpacks
App source + Nix packages + Docker = Image
Maybe testing I can find the solution
It needs to be possible to set a build time variable for nixpacks: NIXPACKS_JDK_VERSION and for paketo buildpacks the one at the top
Or just set it always to the newest jdk, they are downwards compatible
do you have a repo to test it?
Yep
wait I'll just test it
GitHub
GitHub - tschuehly/hyperspring-demo
Contribute to tschuehly/hyperspring-demo development by creating an account on GitHub.
This one in Kotlin but has the same problem
Thanks, I will try in the night !
Hey there, is it possible now to set a build time environment variable?
I would like to create a blogpost about dokploy aswell
For build environment you can use the dockerfile builder
When you use the dockerfile builder in the environment tab it will unlock a Builds envs field
But I would like to use paketo buildpacks. It's the default for spring
I remember for every builder we pass the same envs as args to the paketo builder
Yeah but I cannot build my Java 23 project, because it uses the Java 17 builder
Have you tried to set that envs in the environment tab?
I did when I first asked, let me try again
It doesn't apply to the builder
Just tried it out
Hmmm let me check the code
How did you set the env can you paste it?
BP_JAVA_VERSION=21

let me test it

You can see it in the deployment logs
in the logs they looks like they are using java 19.0 for example
I used this env BP_JVM_VERSION=19.0
that errors below are other things
but in the logs said
Using Java version 19.0 from BP_JVM_VERSION
let me try
oh I can't read π
xD
did it work?
seems to work π
I would like to support you, when I do it with opencollective, I get a link to my saas?
Yes, just send me the link of your business and I will put in the readme and website!
done
Interaktives Hochzeits-Fotospiel fΓΌr unvergessliche Momente
Entdecken Sie PhotoQuest: Das innovative Hochzeits-Fotospiel, das Ihre GΓ€ste vernetzt und Ihr Fest belebt.
Erstellen Sie ein einzigartiges Fotobuch mit spaΓigen Aufgaben, Bildergalerie und Live-Slideshow. Jetzt ab 99,99β¬!
Thank youuu
I will add now!
nice
do you have any logo url?