Deploy Spring Boot on Light Cloud - a Java container on port 8080, configured through environment variables and relaxed property binding.
Deploy Spring Boot
Spring Boot is detected from your pom.xml or build.gradle and runs as a Java container on port 8080. No Dockerfile needed - one is generated unless the repo has its own.
Serve it#
Match the routed port, either by leaving both at 8080, or by mapping the PORT variable in application.properties:
server.port=${PORT:8080}
Tomcat binds all interfaces by default - nothing else to configure.
Configuration and database#
Spring's relaxed binding maps environment variables onto properties - SPRING_DATASOURCE_URL becomes spring.datasource.url. From the database's Credentials tab:
SPRING_DATASOURCE_URL=jdbc:postgresql://203.0.113.10:5432/mydb?sslmode=require
SPRING_DATASOURCE_USERNAME=appuser
SPRING_DATASOURCE_PASSWORD=...
Flyway and Liquibase run their migrations at startup by default, where the database is reachable - which fits the platform's model.
Scaling#
JVM startup is the slow end of cold starts - seconds, not milliseconds. For production, set min instances to 1; previews can stay at zero. Memory matters too: pick at least the Small size for a typical Boot app.