Deploy your application
Take a Spring Boot repository from source code to a public HTTPS URL. You will package it as a container, push the image, describe the runtime, and apply it to production.
Before you start
Section titled “Before you start”You need:
- a deliberate. account, Team, and authenticated CLI—complete Install and sign in first;
- Docker, Podman, or nerdctl; and
- a Java application that listens on a known HTTP port.
The example uses Java 21, Maven Wrapper, port 8080, and Spring Boot Actuator’s
/actuator/health endpoint. Change those details to match your application.
1. Package the Java application
Section titled “1. Package the Java application”Add a Dockerfile at the repository root:
FROM eclipse-temurin:21-jdk AS buildWORKDIR /srcCOPY . .RUN ./mvnw -DskipTests package \ && cp "$(find target -maxdepth 1 -name '*.jar' ! -name '*-plain.jar' | head -1)" /app.jar
FROM eclipse-temurin:21-jreRUN useradd --system --uid 10001 appCOPY --from=build --chown=10001:10001 /app.jar /app.jarUSER 10001EXPOSE 8080ENTRYPOINT ["java", "-jar", "/app.jar"]For Gradle, replace the Maven build command with ./gradlew bootJar and copy
the resulting application JAR from build/libs/.
2. Confirm the active Team
Section titled “2. Confirm the active Team”deliberate team showIf this is not the Team that should own the application, switch it with
deliberate team use <team-slug> before minting registry credentials.
3. Push the image to the deliberate. registry
Section titled “3. Push the image to the deliberate. registry”Let the CLI mint a short-lived push credential and log your local container runtime in:
deliberate registry loginDocker is auto-detected first; use --runtime podman or --runtime nerdctl to
choose another runtime. The command prints the registry and Team-scoped image
prefix. Tag and push an immutable version:
docker build -t registry.deliberate.cloud/<team-slug>/hello-java:1.0.0 .docker push registry.deliberate.cloud/<team-slug>/hello-java:1.0.0Your Team’s workloads receive pull access to its private registry namespace automatically.
4. Describe the deployment
Section titled “4. Describe the deployment”Create .deliberate/project.yaml:
team: <team-slug>project: hello-javaflow: defaultCreate .deliberate/app.yaml:
resource: componentname: appimage: registry.deliberate.cloud/acme/hello-java:1.0.0cpu: 1memory: 2Giports: - port: 8080 protocol: httphealthcheck: path: /actuator/health port: 8080 initialDelay: 30s
---resource: routehost: hello-javavisibility: publicrules: - path: / to: appopen: - label: Open hello-java path: / description: Open the deployed application.Replace acme with your Team slug. The Component declares maximum runtime
headroom: CPU is throttled at its boundary, while exceeding memory may restart
the Component. On the default standard class this is not reserved capacity;
measured consumption determines usage and the values protect against runaway
processes and spending. The platform uses 1 vCPU and 2Gi when these fields
are omitted.
The declared port is internal until the separate route exposes it publicly.
If your app has no Actuator endpoint, point healthcheck.path at another
endpoint that returns HTTP 2xx when the process is ready.
Applications commonly need environment variables, secrets, databases, object storage, volumes, or a custom/private route. Project configuration shows how those resources are granted and wired without adding platform-specific configuration to your application.
5. Apply and open
Section titled “5. Apply and open”Run these commands from the directory containing .deliberate/:
deliberate apply --env productiondeliberate open --env productionapply validates the complete tree and streams progress until the application
is ready. open opens the public route declared above.
6. Deploy and test a change
Section titled “6. Deploy and test a change”Before changing production, deploy the complete Project into a temporary
Environment. Change the image tag in .deliberate/app.yaml, then apply to any
name matching the default Flow’s preview-* stage:
deliberate apply --env preview-new-greetingdeliberate open --env preview-new-greetingThere is no separate create step. On its first apply, deliberate. recognises
the preview-* name and forks the current production Environment according to
the Flow’s clone policy. Components, configuration, routes, secrets, and
supported data resources come across together; the changed .deliberate/ tree
is then reconciled on top. The preview receives its own generated routes, so it
can be exercised without replacing production.
When the change is accepted, keep the same desired state and apply it to production:
deliberate apply --env productionThen remove the temporary Environment and everything it stood up:
deliberate envs delete preview-new-greetingEnvironment deletion is idempotent, making the same cleanup command suitable for a local workflow or CI.
7. If it does not become ready
Section titled “7. If it does not become ready”deliberate components list --env productiondeliberate deployments list --env productiondeliberate logs --env production --component appThe usual first-deploy failures are a wrong image path, the process listening on a different port, or a health endpoint that is absent or not ready yet. The Environment canvas in the console shows the same component, route, rollout, and health state. Continue with Observe and recover for the recovery loop and the boundary between deployment rollback and data restore.