Skip to content

trigremm/dc-postgres

Repository files navigation

dc-postgres

PostgreSQL 15 + Adminer (web UI on port 8080).

Note: Using PostgreSQL 15 for compatibility with existing deployments. Latest available: 17.5-bullseye.

Quick start

cp .env.sample .env
cp .env.pgbackup.sample .env.pgbackup
vim .env
make up

Commands

Lifecycle

make d          # deploy (git pull + recreate)
make r          # recreate (build + stop + up)
make up         # start
make stop       # stop
make down       # stop and remove
make ps         # status
make l          # follow logs

PostgreSQL

All commands run inside Docker — no host dependencies required.

make pg-shell          # connect to psql shell
make pg-databases      # list databases
make pg-backup         # backup (dump + sql + schema-only) to .docker_volumes/backups/
make pg-backup-shell   # interactive shell in backup container

Adminer

Open http://localhost:8080 — web UI for database management.

Backups

Backups are created via a separate Docker container (pgbackup) that produces 3 files:

  • db_backup_<db>_<timestamp>.dump — custom format (for pg_restore)
  • db_backup_<db>_<timestamp>.sql — plain SQL
  • db_schema_only_<db>_<timestamp>.sql — schema only

Files are stored in .docker_volumes/backups/.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors