There was an error while loading. Please reload this page.
Для сборки потребуются:
Клонируем репозиторий pgator, заходим в полученную директорию и выполняем команду сборки:
dub build --force
Полученный после сборки исполняемый файл находится в bin/
Создадим конфигурационный файл /etc/pgator.conf:
{ "sqlServers": [ { "maxConn": 5, "connString": "dbname=mydbname user=postgres" } ], "sqlAuth": [ "pgator.username", "pgator.password" ], "maxConn": 10, "port": 8080, "sqlTimeout": 1000, "logname": "/var/log/pgator/pgator.txt", "vibelog": "/var/log/pgator/http.log", "sqlJsonTable": "public.json_rpc", "userid": 1000, "groupid": 1000 }
Теперь pgator можно запустить с правами postgres командой:
su -c "bin/pgator --daemon --pidfile=/tmp/pgator.pid --lockfile=/tmp/pgator.lock" postgres