Deploy your application
This walkthrough starts with a Spring Boot repository and ends with a public URL. deliberate. deploys container images; the build remains under your control and can run locally or in your existing CI.
Before you start
Section titled “Before you start”You need:
- a deliberate. account and Team;
- 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. Install the CLI and select your Team
Section titled “2. Install the CLI and select your Team”curl -fsSL https://get.deliberate.cloud | shdeliberate logindeliberate team listdeliberate team use <team-slug>team use makes the selection persistent for later registry and deployment
commands.
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: 0.5memory: 1Giports: - 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 runtime resources
and its internal port. The separate route is the deliberate public exposure.
If your app has no Actuator endpoint, point healthcheck.path at another
endpoint that returns HTTP 2xx when the process is ready.
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.