https://github.com/gerardnico/postgres
Postgres in Docker
https://github.com/gerardnico/postgres
Last synced: 3 months ago
JSON representation
Postgres in Docker
- Host: GitHub
- URL: https://github.com/gerardnico/postgres
- Owner: gerardnico
- Created: 2024-09-25T14:28:23.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-02-22T08:28:33.000Z (3 months ago)
- Last Synced: 2025-02-22T09:38:26.916Z (3 months ago)
- Language: Shell
- Size: 193 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PG-X - Postgres with eXtra
## Run
### Docker
Set your value in the [.env](.env) file
* To run with `pgdata` at `/data` on the [disk](https://github.com/docker-library/docs/blob/master/postgres/README.md#where-to-store-data)
```bash
docker rm postgres
docker run \
--name postgres \
--env-file .env \
--user 1000:1000 \
--group-add postgres \
-d \
-p 5432:5432 \
-v $PWD/mount:/data \
gerardnico/postgres:16.3-latest
```Error?
```bash
docker logs postgres
```## Extras
* Backup dump and restore
* Point In Time recovery with restic
* [Wsl Adapted](docs/how-to/init.md#wsl)## How to
* [How to init/create the container](docs/how-to/init.md)
* [How to perform a dump](docs/how-to/dump.md)
* [How to restore from a dump](docs/how-to/restore.md)
* [How to set the retention policy and integrity check](docs/how-to/snapshot.md)## Env
See [.env](.env)
Note that all [libpq environments variable](https://www.postgresql.org/docs/current/libpq-envars.html)
may be applied for client app.## Support
### Diagnostic
Log is on at `$PGDATA/log`
### Restic Repo not found
Be sure to path the good password in the environment variable ie `RESTIC_PASSWORD`.
```bash
postgres | Restic Repo not found - Restic init at s3:host/bucket-name
postgres | Fatal: create key in repository at s3:host/bucket-name failed: repository master key and config already initialized
```## How to contribute
See [dev doc](contrib/README)