-
-
Notifications
You must be signed in to change notification settings - Fork 231
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Eric Nemchik <[email protected]>
- Loading branch information
Showing
16 changed files
with
97 additions
and
97 deletions.
There are no files selected for viewing
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
# pgAdmin | ||
|
||
[![Docker Pulls](https://img.shields.io/docker/pulls/dpage/pgadmin4?style=flat-square&color=607D8B&label=docker%20pulls&logo=docker)](https://hub.docker.com/r/dpage/pgadmin4) | ||
[![GitHub Stars](https://img.shields.io/github/stars/pgadmin-org/pgadmin4?style=flat-square&color=607D8B&label=github%20stars&logo=github)](https://github.com/pgadmin-org/pgadmin4) | ||
[![Compose Templates](https://img.shields.io/static/v1?style=flat-square&color=607D8B&label=compose&message=templates)](https://github.com/GhostWriters/DockSTARTer/tree/master/compose/.apps/pgadmin) | ||
|
||
## Description | ||
|
||
[pgAdmin](https://www.pgadmin.org/): pgAdmin is the most popular and feature rich Open Source administration and development platform for PostgreSQL, the most advanced Open Source database in the world. | ||
|
||
## Install/Setup | ||
|
||
An email address (login) and password are the only required inputs for a fullly functional instance of pgAdmin. | ||
|
||
Full variable documentation is available in the pgadmin [documentation](https://www.pgadmin.org/docs/pgadmin4/latest/container_deployment.html#environment-variables). | ||
|
||
Any variable name from [config.py](https://www.pgadmin.org/docs/pgadmin4/latest/config_py.html#config-py) can be defined in the format of `PGADMIN_CONFIG_*` in docker-compose.override.yml | ||
# pgAdmin | ||
|
||
[![Docker Pulls](https://img.shields.io/docker/pulls/dpage/pgadmin4?style=flat-square&color=607D8B&label=docker%20pulls&logo=docker)](https://hub.docker.com/r/dpage/pgadmin4) | ||
[![GitHub Stars](https://img.shields.io/github/stars/pgadmin-org/pgadmin4?style=flat-square&color=607D8B&label=github%20stars&logo=github)](https://github.com/pgadmin-org/pgadmin4) | ||
[![Compose Templates](https://img.shields.io/static/v1?style=flat-square&color=607D8B&label=compose&message=templates)](https://github.com/GhostWriters/DockSTARTer/tree/master/compose/.apps/pgadmin) | ||
|
||
## Description | ||
|
||
[pgAdmin](https://www.pgadmin.org/): pgAdmin is the most popular and feature rich Open Source administration and development platform for PostgreSQL, the most advanced Open Source database in the world. | ||
|
||
## Install/Setup | ||
|
||
An email address (login) and password are the only required inputs for a fullly functional instance of pgAdmin. | ||
|
||
Full variable documentation is available in the pgadmin [documentation](https://www.pgadmin.org/docs/pgadmin4/latest/container_deployment.html#environment-variables). | ||
|
||
Any variable name from [config.py](https://www.pgadmin.org/docs/pgadmin4/latest/config_py.html#config-py) can be defined in the format of `PGADMIN_CONFIG_*` in docker-compose.override.yml |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,41 @@ | ||
# pgBackup | ||
|
||
[![Docker Pulls](https://img.shields.io/docker/pulls/prodrigestivill/postgres-backup-local?style=flat-square&color=607D8B&label=docker%20pulls&logo=docker)](https://hub.docker.com/r/prodrigestivill/postgres-backup-local) | ||
[![GitHub Stars](https://img.shields.io/github/stars/prodrigestivill/docker-postgres-backup-local?style=flat-square&color=607D8B&label=github%20stars&logo=github)](https://github.com/prodrigestivill/docker-postgres-backup-local) | ||
[![Compose Templates](https://img.shields.io/static/v1?style=flat-square&color=607D8B&label=compose&message=templates)](https://github.com/GhostWriters/DockSTARTer/tree/master/compose/.apps/pgbackup) | ||
|
||
## Description | ||
|
||
[pgBackup](https://hub.docker.com/r/prodrigestivill/postgres-backup-local): Backup PostgresSQL to the local filesystem with periodic rotating backups | ||
|
||
## Install/Setup | ||
|
||
Set your postgres host, username and password in the .env file along with a comma seperated list of databases you want to backup. | ||
|
||
By default, backups run daily. Change PGBACKUP_SCHEDULE to any valid [cron schedule](http://godoc.org/github.com/robfig/cron#hdr-Predefined_schedules) to modify the default. | ||
|
||
### Recommended docker-compose overrides | ||
|
||
For extra security, it is recommended to limit permissions on the backup folder to a priviledged user. Modify docker-compose.override.yml as below. | ||
|
||
If you are using postgres docker container, add a dependency to the container | ||
|
||
```yaml | ||
pgbackup: | ||
user: postgres:postgres | ||
depends_on: | ||
- postgres | ||
``` | ||
## Manually trigger a backup | ||
`docker exec -it pgbackup ./backup.sh` | ||
|
||
## Restore from latest backup | ||
|
||
If the database already exists, drop it. | ||
Create a database <db_name> | ||
|
||
```bash | ||
docker exec -it <postgres_container> /bin/sh -c "zcat /storage/backups/postgres/last/<db_name>-latest.sql.gz | psql --username=<username> --dbname=<db_name> -W" | ||
``` | ||
# pgBackup | ||
|
||
[![Docker Pulls](https://img.shields.io/docker/pulls/prodrigestivill/postgres-backup-local?style=flat-square&color=607D8B&label=docker%20pulls&logo=docker)](https://hub.docker.com/r/prodrigestivill/postgres-backup-local) | ||
[![GitHub Stars](https://img.shields.io/github/stars/prodrigestivill/docker-postgres-backup-local?style=flat-square&color=607D8B&label=github%20stars&logo=github)](https://github.com/prodrigestivill/docker-postgres-backup-local) | ||
[![Compose Templates](https://img.shields.io/static/v1?style=flat-square&color=607D8B&label=compose&message=templates)](https://github.com/GhostWriters/DockSTARTer/tree/master/compose/.apps/pgbackup) | ||
|
||
## Description | ||
|
||
[pgBackup](https://hub.docker.com/r/prodrigestivill/postgres-backup-local): Backup PostgresSQL to the local filesystem with periodic rotating backups | ||
|
||
## Install/Setup | ||
|
||
Set your postgres host, username and password in the .env file along with a comma seperated list of databases you want to backup. | ||
|
||
By default, backups run daily. Change PGBACKUP_SCHEDULE to any valid [cron schedule](http://godoc.org/github.com/robfig/cron#hdr-Predefined_schedules) to modify the default. | ||
|
||
### Recommended docker-compose overrides | ||
|
||
For extra security, it is recommended to limit permissions on the backup folder to a priviledged user. Modify docker-compose.override.yml as below. | ||
|
||
If you are using postgres docker container, add a dependency to the container | ||
|
||
```yaml | ||
pgbackup: | ||
user: postgres:postgres | ||
depends_on: | ||
- postgres | ||
``` | ||
## Manually trigger a backup | ||
`docker exec -it pgbackup ./backup.sh` | ||
|
||
## Restore from latest backup | ||
|
||
If the database already exists, drop it. | ||
Create a database <db_name> | ||
|
||
```bash | ||
docker exec -it <postgres_container> /bin/sh -c "zcat /storage/backups/postgres/last/<db_name>-latest.sql.gz | psql --username=<username> --dbname=<db_name> -W" | ||
``` |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,39 @@ | ||
# PostgresSQL | ||
|
||
[![Docker Pulls](https://img.shields.io/docker/pulls/_/postgres?style=flat-square&color=607D8B&label=docker%20pulls&logo=docker)](https://hub.docker.com/r/_/postgres) | ||
[![GitHub Stars](https://img.shields.io/github/stars/docker-library/postgres?style=flat-square&color=607D8B&label=github%20stars&logo=github)](https://github.com/docker-library/postgres) | ||
[![Compose Templates](https://img.shields.io/static/v1?style=flat-square&color=607D8B&label=compose&message=templates)](https://github.com/GhostWriters/DockSTARTer/tree/master/compose/.apps/postgres) | ||
|
||
## Description | ||
|
||
[Postgres](https://www.postgresql.org/): The World's Most Advanced Open Source Relational Database | ||
|
||
## Install/Setup | ||
|
||
PostgreSQL is a powerful, open source object-relational database system with over 35 years of active development that has earned it a strong reputation for reliability, feature robustness, and performance. | ||
|
||
There is a wealth of information to be found describing how to [install](https://www.postgresql.org/download/) and [use](https://www.postgresql.org/docs/) PostgreSQL through the [official documentation](https://www.postgresql.org/docs/). The [open source community](https://www.postgresql.org/community/) provides many helpful places to become familiar with PostgreSQL, discover how it works. | ||
|
||
We **heavily** recommend that if you spin up a container that requires a database you create a user for that container. You should **NEVER** use the root account for anything other than database management. | ||
|
||
Strongly consider also installing [pgAdmin](https://github.com/GhostWriters/DockSTARTer/tree/master/compose/.apps/pgadmin) for adminsitration and [pgBackup](https://github.com/GhostWriters/DockSTARTer/tree/master/compose/.apps/pgbackup) for periodic rotating backups. | ||
|
||
## Common Activities | ||
|
||
### Create user | ||
|
||
``` sql | ||
CREATE USER newuser WITH PASSWORD 'password123'; | ||
``` | ||
|
||
### Make user a superuser | ||
|
||
``` sql | ||
CREATE USER newadmin WITH PASSWORD 'password123'; | ||
ALTER USER newadmin WITH SUPERUSER; | ||
``` | ||
|
||
### Create a database and owner to the new user | ||
|
||
CREATE DATABASE newdatabase; | ||
ALTER DATABASE newdatabase OWNER TO newuser; | ||
# PostgresSQL | ||
|
||
[![Docker Pulls](https://img.shields.io/docker/pulls/_/postgres?style=flat-square&color=607D8B&label=docker%20pulls&logo=docker)](https://hub.docker.com/r/_/postgres) | ||
[![GitHub Stars](https://img.shields.io/github/stars/docker-library/postgres?style=flat-square&color=607D8B&label=github%20stars&logo=github)](https://github.com/docker-library/postgres) | ||
[![Compose Templates](https://img.shields.io/static/v1?style=flat-square&color=607D8B&label=compose&message=templates)](https://github.com/GhostWriters/DockSTARTer/tree/master/compose/.apps/postgres) | ||
|
||
## Description | ||
|
||
[Postgres](https://www.postgresql.org/): The World's Most Advanced Open Source Relational Database | ||
|
||
## Install/Setup | ||
|
||
PostgreSQL is a powerful, open source object-relational database system with over 35 years of active development that has earned it a strong reputation for reliability, feature robustness, and performance. | ||
|
||
There is a wealth of information to be found describing how to [install](https://www.postgresql.org/download/) and [use](https://www.postgresql.org/docs/) PostgreSQL through the [official documentation](https://www.postgresql.org/docs/). The [open source community](https://www.postgresql.org/community/) provides many helpful places to become familiar with PostgreSQL, discover how it works. | ||
|
||
We **heavily** recommend that if you spin up a container that requires a database you create a user for that container. You should **NEVER** use the root account for anything other than database management. | ||
|
||
Strongly consider also installing [pgAdmin](https://github.com/GhostWriters/DockSTARTer/tree/master/compose/.apps/pgadmin) for adminsitration and [pgBackup](https://github.com/GhostWriters/DockSTARTer/tree/master/compose/.apps/pgbackup) for periodic rotating backups. | ||
|
||
## Common Activities | ||
|
||
### Create user | ||
|
||
``` sql | ||
CREATE USER newuser WITH PASSWORD 'password123'; | ||
``` | ||
|
||
### Make user a superuser | ||
|
||
``` sql | ||
CREATE USER newadmin WITH PASSWORD 'password123'; | ||
ALTER USER newadmin WITH SUPERUSER; | ||
``` | ||
|
||
### Create a database and owner to the new user | ||
|
||
CREATE DATABASE newdatabase; | ||
ALTER DATABASE newdatabase OWNER TO newuser; |