notes/pghero.md

32 lines
836 B
Markdown
Raw Normal View History

2020-02-07 01:00:17 -05:00
https://github.com/ankane/pghero/blob/master/guides/Linux.md
get:
```
wget -qO- https://dl.packager.io/srv/pghero/pghero/key | sudo apt-key add -
sudo wget -O /etc/apt/sources.list.d/pghero.list \
https://dl.packager.io/srv/pghero/pghero/master/installer/ubuntu/18.04.repo
sudo apt-get update
sudo apt-get -y install pghero
```
Add your database. (use \ to escape special passw chars)
```
sudo pghero config:set DATABASE_URL=postgres://user:password@hostname:5432/dbname
```
And optional authentication.
```
sudo pghero config:set PGHERO_USERNAME=link
sudo pghero config:set PGHERO_PASSWORD=hyrule
```
Start the server
```
sudo pghero config:set PORT=3001
sudo pghero config:set RAILS_LOG_TO_STDOUT=disabled
sudo pghero scale web=1
```
Confirm its running with:
2020-02-07 00:47:47 -05:00
`curl -v http://localhost:3001/`