Skip to content

Commit

Permalink
fix: adjust line endings and chmod
Browse files Browse the repository at this point in the history
Signed-off-by: Eric Nemchik <[email protected]>
  • Loading branch information
nemchik committed Nov 22, 2023
1 parent 10179d8 commit 0163b5f
Show file tree
Hide file tree
Showing 16 changed files with 97 additions and 97 deletions.
Empty file modified compose/.apps/pgadmin/pgadmin.aarch64.yml
100755 → 100644
Empty file.
Empty file modified compose/.apps/pgadmin/pgadmin.hostname.yml
100755 → 100644
Empty file.
Empty file modified compose/.apps/pgadmin/pgadmin.labels.yml
100755 → 100644
Empty file.
Empty file modified compose/.apps/pgadmin/pgadmin.netmode.yml
100755 → 100644
Empty file.
Empty file modified compose/.apps/pgadmin/pgadmin.ports.yml
100755 → 100644
Empty file.
Empty file modified compose/.apps/pgadmin/pgadmin.x86_64.yml
100755 → 100644
Empty file.
Empty file modified compose/.apps/pgadmin/pgadmin.yml
100755 → 100644
Empty file.
Empty file modified compose/.apps/pgbackup/pgbackup.aarch64.yml
100755 → 100644
Empty file.
Empty file modified compose/.apps/pgbackup/pgbackup.hostname.yml
100755 → 100644
Empty file.
Empty file modified compose/.apps/pgbackup/pgbackup.labels.yml
100755 → 100644
Empty file.
Empty file modified compose/.apps/pgbackup/pgbackup.netmode.yml
100755 → 100644
Empty file.
Empty file modified compose/.apps/pgbackup/pgbackup.x86_64.yml
100755 → 100644
Empty file.
Empty file modified compose/.apps/pgbackup/pgbackup.yml
100755 → 100644
Empty file.
34 changes: 17 additions & 17 deletions docs/apps/pgadmin.md
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
82 changes: 41 additions & 41 deletions docs/apps/pgbackup.md
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"
```
78 changes: 39 additions & 39 deletions docs/apps/postgres.md
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;

0 comments on commit 0163b5f

Please sign in to comment.