https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-ubuntu-18-04
https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-18-04
https://www.digitalocean.com/community/tutorials/how-to-install-docker-compose-on-ubuntu-18-04
https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-ubuntu-18-04
server {
listen 80;
server_name egov.transerve.com;
location / {
proxy_pass http://localhost:8083;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
PostgreSQL is bound only to local IP Address. So, a connection can be made locally. We only ever use one database devdb
sudo -u postgres psqlThis opens up a postgres=# prompt
Connect via ssh tunnel using the digit config pem file and host and then connect to postgres. The password should not be required but if it did it is the same password used in jdbc, i.e. postgres.
- List databases:
\l - Drop database:
DROP DATABASE billingnew; - Create a new database:
CREATE DATABASE devdb; - Show users:
\du