Skip to main content

Postgresql

PostgreSQL is a powerful, open source object-relational database system with over 35 years of active development.
Below you can find a basic example to deploy a postgresql server using their official docker image:


Copy past the previous content and save it under a file called postgresql.yml.
Then execute the following command to startup a postgresql server:

nanocl state apply -s postgresql.yml -- --password my_root_password --volume /opt/postgresql
tip

Other cargo created in the same namespace global will be able to connect to the postgresql using is key postgresql.global.c The key can be predicted and caculated, it's formated this way: cargo_name.namespace_name.c|v c for container or v for virtual machine. This allow us to have the same name for virtual machine and containers.