readme: fixes and corrections [skip ci]

This commit is contained in:
leo 2023-05-23 14:03:02 +02:00
parent 547f6e7b3c
commit 11b28e3d39
Signed by: wanderer
SSH Key Fingerprint: SHA256:Dp8+iwKHSlrMEHzE3bJnPng70I7LEsa3IJXRH/U+idQ

@ -34,19 +34,26 @@ just kaniko
just dbstart
# in another terminal, run the application.
# make sure to supply real CONNSTRING values for production environment.
# LiveMode=False disables loading assets and templates from the filesystem and
# instead uses the embedded resources.
podman run --rm -it -e PCMT_DBTYPE=postgres \
-e PCMT_CONNSTRING="host=127.0.0.1 port=5432 sslmode=disable dbname=postgres password=postgres"
-e PCMT_LIVE=False docker.io/immawanderer/pcmt:testbuild \
-config /etc/pcmt/config.dhall
```
while the above is fine, running in *pods* is more close to a production
setting (assuming rootless setup):
while the above runs *fine*, running in **pods** is *better* and more close to
a production setting (assuming
[rootless](https://www.redhat.com/sysadmin/rootless-podman-user-namespace-modes)
[Podman](https://www.redhat.com/sysadmin/rootless-containers-podman) setup):
```sh
# create a pod.
# create a pod 🦭.
podman pod create --userns=keep-id -p3005:3000 --name pcmt
# if you have the db from the previous example still running, terminate it by
# pressing ^C or running the following:
just dbstop
# run a db in the pod.
podman run --pod pcmt --replace -d --name "pcmt-pg" --rm \
-e POSTGRES_INITDB_ARGS="--auth-host=scram-sha-256 --auth-local=scram-sha-256" \
@ -65,14 +72,14 @@ podman run --pod pcmt --replace --name pcmt-og -d --rm \
docker.io/immawanderer/pcmt:testbuild -config /config.dhall
# also, if we try to connect to the db from the host we get an error (unless
there is another database running on localhost already, such as the one from
the previous example).
# there is another database running on localhost already, such as the one from
# the previous example).
curl localhost:5432
--> curl: (7) Failed to connect to localhost port 5432 after 0 ms: Couldn't connect to server
# that is because the database port has not been exposed from the pod (recall
the pod creation command).
# the pod creation command).
```
#### Custom config