This is a apolo-flow
action launching an instance of Postgres SQL server.
Usage example could be found in the .neuro/live.yaml file.
-
db_user
Postgres DB server username. It's set as environment variable
POSTGRES_USER
within the server instance.args: db_user: "postgres"
-
db_password
Postgres DB server password. It's set as environment variable
POSTGRES_PASSWORD
within the server instance. Consider usage of Apolo secrets.args: db_password: "I@#PN$)9!"
-
db_dir_remote
A place to store Postgres files. This should be either
storage:
, ordisk:
.Examples:
You can use platform storage as a backend.
args: db_dir_remote: storage:might/be/with/some/path
Or an example with the disk (using its name, or ID). Note, you cannot pass a disk internal path, since only entire disk could be mounted.
args: db_dir_remote: disk:disk-e7440b1a-7d09-4a15-a237-02ec022e6c22
-
job_name
Predictable subdomain name which replaces the job's ID in the full job URI.
""
by default (in this case, the job name will be generated byapolo-flow
).args: job_name: "postgres-server"
-
preset
Resource preset to use when running the Postgres job.
""
by default (i.e., the first preset specified in theapolo config show
list will be used).args: preset: cpu-small
-
life_span
A value specifying how long the Postgres server job should be running.
"10d"
by default.args: life_span: 1d2h3m
-
db_version
PostgreSQL server version, used as an image tag.
"14"
by default. Checkout list of available tags here.args: db_version: "12-bullseye"
-
postgres_initdb_args
Value of Postgress env var
POSTGRES_INITDB_ARGS
. Empty be default.args: POSTGRES_INITDB_ARGS: "--data-checksums"
This might happen if the platform storage:
backend does not support such an operation (happened with Azure Files and CIFS).
A work-around for this is to use a platform disk:
to host the Postgres data.