From 11b28e3d399fd802d7ef2a888de8bfa391c17779 Mon Sep 17 00:00:00 2001 From: leo Date: Tue, 23 May 2023 14:03:02 +0200 Subject: [PATCH] readme: fixes and corrections [skip ci] --- README.md | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 4cdf9a1..dde2278 100644 --- a/README.md +++ b/README.md @@ -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