This is a collection of information on PostgreSQL and PostGIS for what I tend to use most often.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Example networking sidecar ingress containers for Cloudflare Argo, Wireguard, Tailscale, LetSencrypt, Caddy, and SOCKS/SSH tunnel containers in Docker Compose. | |
| # https://gist.github.com/pirate/1996d3ed6c5872b1b7afded250772f7c | |
| # Goes well with these docker-compose database container examples: | |
| # https://gist.github.com/pirate/1fafaa18a47254f388aa5c0f79f7d263 | |
| version: '2.4' | |
| services: | |
| demo: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Example database container setups for PostgreSQL, MariaDB, Redis, Memcached, MongoDB, Neo4j, Hasura GraphQL, CockroachDB, and TiDB in Docker Compose | |
| # https://gist.github.com/pirate/1fafaa18a47254f388aa5c0f79f7d263 | |
| # Goes well with these docker-compose networking/ingress container examples: | |
| # https://gist.github.com/pirate/1996d3ed6c5872b1b7afded250772f7c | |
| version: '2.4' | |
| services: | |
| postgres: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| apiVersion: v1 | |
| kind: Namespace | |
| metadata: | |
| name: wordpress | |
| --- | |
| apiVersion: v1 | |
| kind: Secret | |
| metadata: | |
| name: wpmulti-externaldb |
Magic words:
psql -U postgresSome interesting flags (to see all, use -h or --help depending on your psql version):
-E: will describe the underlaying queries of the\commands (cool for learning!)-l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)