Spring Boot hosting
Run Spring Boot with reserved memory for the JVM heap and dedicated CPU for consistent latency. Managed PostgreSQL and Redis are on the private network, and Actuator health checks control when traffic switches.
Build and run
- Detected by
- spring-boot in pom.xml or build.gradle
- Build
- ./mvnw -q -DskipTests package
- Start
- java -jar target/app.jar
FROM eclipse-temurin:21-jdk-alpine AS build
WORKDIR /app
COPY . .
RUN ./mvnw -q -DskipTests package
FROM eclipse-temurin:21-jre-alpine
WORKDIR /app
COPY --from=build /app/target/*.jar app.jar
EXPOSE 8080
ENV JAVA_OPTS="-XX:MaxRAMPercentage=75"
CMD ["sh", "-c", "java $JAVA_OPTS -jar app.jar"]Recommendations
- Use -XX:MaxRAMPercentage instead of a fixed -Xmx so the heap follows the process memory allocation.
- Point the health check at /actuator/health so traffic switches only after the context has started.
- Run Flyway or Liquibase migrations at startup or in the release command.
- Keep the HikariCP pool at 20 connections or fewer on Launch.
Plans
| Plan | Price | vCPU | Memory | NVMe | Databases | Backups |
|---|---|---|---|---|---|---|
| Launch | $149/mo | 8 | 16 GB | 160 GB | 1 | Daily, kept 7 days |
| Grow | $249/mo | 12 | 32 GB | 320 GB | 2 | Daily, kept 14 days |
| Scale | $349/mo | 16 | 48 GB | 500 GB | 3, plus a read replica | Hourly and daily, kept 30 days |
| Custom | On request | As required | Up to a full server | As required | As required | As required |
Questions
Do we need a Dockerfile to deploy Spring Boot?
No. 9live detects Spring Boot and builds it with a maintained buildpack. If your repository has a Dockerfile, we use it instead.
How are environment variables managed?
Set them per environment in the dashboard or with the CLI. They are encrypted at rest and injected at runtime. Connection strings for managed databases are added automatically.
What happens when a deploy fails?
If the build fails, or the new release fails its health check, the current release keeps serving traffic. You get a notification with the build or health-check logs.
Talk to an engineer about your setup
Tell us what you run today and where it runs. We reply within one business day with a recommended plan and an estimate for the migration.
