Make sure to log into Unikraft Cloud by setting your token and a metro close to you.
We use fra0 (Frankfurt, 🇩🇪) in this guide:
When done, invoke the following command to deploy this application on Unikraft Cloud:
The output shows the instance URL and other details:
In this case, the instance name is postgres-saan9 and the service young-thunder-fbafrsxj.
They are different for each run.
If you use port 5432/tls as per the example above you can now directly connect to postgres:
Use the unikraft password at the password prompt.
You should see output similar to:
Use SQL and psql commands for your work.
At any point in time, you can list information about the instance:
When done, you can remove the instance:
Using Volumes
You can use volumes for data persistence for you PostgreSQL instance.
For that you would first create a volume:
Then start the PostgreSQL instance and mount that volume:
Customize Your Deployment
Your deployment is a standard PostgreSQL installation.
Customizing the deployment generally means providing a different environment.
An obvious one is to use a different database password when starting PostgreSQL.
For that you use a different POSTGRES_PASSWORD environment variable when starting the PostgreSQL instance.
You could also a different location to mount your volume or set additional configuration options.
And, of course, you can use the PostgreSQL instance in conjunction with a frontend service, see the guide here.
However, in that case make sure to disable scale-to-zero if you plan to use the DB internally.
Learn More
Use the --help option for detailed information on using Unikraft Cloud: