Skip to main content

Configure Database Connection

Executables can use VaultCode's stateful mode. In stateful mode, executables receive credentials for a PostgreSQL database connection, where they can persist data between runs. VaultCode passes the credentials to the executable via stdin.

To grant access to the database, enable the following settings in the application-xyz.yml file:

vaultcode:
statefulDatabaseExecutions: true

If you are using WASM, you additionally need to enable the following. This is required to grant the WASM executable to access the local network between the VaultCode container and the database container.

vaultcode:
statefulDatabaseExecutions: true
execution:
wasm:
allowSockets: true # WASIp2 socket adapter to resolve local networking
info

A single VaultCode instance has exactly one database for all executables that it runs. Between different runs, or if you swap out the executable by uploading a new JAR/WASM, the database and its tables remain the same.

Get startedwith CloudHSM.
Other questions?Ask Sales.
Feedback
Need help?