diff --git a/cfg/pgr/config b/cfg/pgr/config index cdd0d6d..5589cc6 100644 --- a/cfg/pgr/config +++ b/cfg/pgr/config @@ -2,3 +2,4 @@ db-uri = "postgresql://[USERNAME]:[PASSWORD]@[HOST_CONNECTION_STRING]" db-schemas = "www" db-anon-role = "anonymous" #jwt-secret = "myownlittlecleansecret" +server-port = 3000 diff --git a/cfg/pgr/postgrest.service b/cfg/pgr/postgrest_bm.service similarity index 63% rename from cfg/pgr/postgrest.service rename to cfg/pgr/postgrest_bm.service index 2ef5a5f..1ea8bb6 100644 --- a/cfg/pgr/postgrest.service +++ b/cfg/pgr/postgrest_bm.service @@ -1,11 +1,11 @@ [Unit] -Description=PostgREST +Description=PostgREST BM After=network.target [Service] User=postgrest Group=postgrest -ExecStart=/usr/local/bin/postgrest /etc/postgrest/config +ExecStart=/usr/local/bin/postgrest /etc/postgrest/config_bm ExecReload=/bin/kill -SIGUSR1 $MAINPID [Install] diff --git a/cfg/pgr/postgrest_fwd.service b/cfg/pgr/postgrest_fwd.service new file mode 100644 index 0000000..f1aa13c --- /dev/null +++ b/cfg/pgr/postgrest_fwd.service @@ -0,0 +1,12 @@ +[Unit] +Description=PostgREST FWD +After=network.target + +[Service] +User=postgrest +Group=postgrest +ExecStart=/usr/local/bin/postgrest /etc/postgrest/config_fwd +ExecReload=/bin/kill -SIGUSR1 $MAINPID + +[Install] +WantedBy=multi-user.target diff --git a/scr/2b_postgrest_service.sh b/scr/2b_postgrest_service.sh index 1506eb7..8124078 100644 --- a/scr/2b_postgrest_service.sh +++ b/scr/2b_postgrest_service.sh @@ -10,11 +10,22 @@ then useradd -M -U -d /nonexistent -s /usr/sbin/nologin postgrest cd /tmp - wget -O postgrest.service https://gi.op.fo/fro/srv-pub/raw/branch/trunk/cfg/pgr/postgrest.service - cp postgrest.service /etc/systemd/system/ - systemctl enable postgrest - systemctl start postgrest - systemctl status postgrest + # fwd service + wget -O postgrest.service https://gi.op.fo/fro/srv-pub/raw/branch/trunk/cfg/pgr/postgrest_fwd.service + cp postgrest_fwd.service /etc/systemd/system/ + + systemctl enable postgrest_fwd + systemctl start postgrest_fwd + systemctl status postgrest_fwd + + # boquete marketplace service + + #wget -O postgrest.service https://gi.op.fo/fro/srv-pub/raw/branch/trunk/cfg/pgr/postgrest_bm.service + #cp postgrest_bm.service /etc/systemd/system/ + + #systemctl enable postgrest_bm + #systemctl start postgrest_bm + #systemctl status postgrest_bm fi