Documentation Index
Fetch the complete documentation index at: https://docs.vertracloud.app/llms.txt
Use this file to discover all available pages before exploring further.
Requirements
- Java 17+ installed locally
- Maven or Gradle configured
- Account on Vertra Cloud
Project Structure
my-api-java/
├── src/
│ ├── main/
│ │ ├── java/
│ │ │ └── com/example/
│ │ │ ├── Application.java
│ │ │ └── controller/
│ │ │ └── ItemController.java
│ │ └── resources/
│ │ └── application.properties
├── pom.xml
└── vertracloud.config
Configuration
pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>my-api</artifactId>
<version>1.0.0</version>
<packaging>jar</packaging>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.2.0</version>
<relativePath/>
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.7.0</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>17</source>
<target>17</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
application.properties
spring.application.name=my-api-java
server.port=${PORT:8080}
server.address=0.0.0.0
# Database
spring.datasource.url=jdbc:postgresql://${DB_HOST:localhost}:${DB_PORT:5432}/${DB_NAME:postgres}
spring.datasource.username=${DB_USER:postgres}
spring.datasource.password=${DB_PASSWORD:}
spring.jpa.hibernate.ddl-auto=update
spring.jpa.show-sql=false
# Logging
logging.level.root=INFO
logging.level.com.example=DEBUG
vertracloud.config
MAIN=pom.xml
VERSION=recommended
Deploy
Via Dashboard
Via GitHub
Via VSCode
- Execute
mvn clean package locally to test the build
- Exclude the
target folder from the project
- Compress into a ZIP file
- Access Dashboard → New Project → Application
- Select Java language and upload
- Configure memory (512MB minimum for Spring Boot, 1GB recommended)
- Click “Create Application”
- Push the project to GitHub (with
pom.xml at root)
- Access Dashboard → New Project → Application
- Select “GitHub” as source
- Choose the repository and configure memory (1GB recommended)
- Configure database environment variables
- Click “Create Application”
- Open the project in VSCode with Vertra Cloud extension installed
- Press
Ctrl+Shift+P and type “Vertra: Deploy”
- Select or create the target application
- Configure memory (1GB recommended) and environment variables
- Wait for automatic build and deployment
Available Versions
| Version | Status | Description |
|---|
| 21 | Recommended | Java 21 LTS (recommended for production) |
| 21 | Latest | Java 21 (latest version) |
| 17 | Stable | Java 17 LTS with extended support |
Notes
- Automatic compilation: Maven compiles the project inside the container during deployment
- Compilation time: May take 5-10 minutes depending on size
- Recommended memory: 1GB for Spring Boot in production (compilation + runtime)
- Environment variables: Configure via dashboard for database credentials
- Logs: Available in real-time in dashboard terminal
- JVM tuning: JVM is automatically configured for the container
- Listen on
0.0.0.0 on port $PORT