https://github.com/patricktrainer/postgres-docker-compose
A local postgres enviornment.
https://github.com/patricktrainer/postgres-docker-compose
Last synced: 4 months ago
JSON representation
A local postgres enviornment.
- Host: GitHub
- URL: https://github.com/patricktrainer/postgres-docker-compose
- Owner: patricktrainer
- License: agpl-3.0
- Created: 2022-05-30T00:43:23.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-11-19T20:03:02.000Z (over 3 years ago)
- Last Synced: 2025-10-23T02:58:33.622Z (8 months ago)
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Postgres Docker Compose
Run postgres locally with docker-compose.
## Quick start
Change to the directory.
```bash
cd /path/to/postgres-docker-compose
```
Start the containers.
```bash
docker-compose up
```
_or_
Start the containers in "detached" mode.
```bash
docker-compose up -d
```
Stop the containers.
```bash
docker-compose down
```
## Services
🚧 Beware hardcoded credentials in `docker-compose.yml`.
The `docker-compose.yml` file consists of two services:
1. `postgres` - runs the postgres server
2. `pgadmin` - runs the pgadmin server
### Access postgres
The `postgres` service runs a postgres server. It is configured to auto-restart the container if it crashes.
- url: `http://localhost:5432`
- username: `postgres`
- password: `changeme`
### Access PgAdmin
The `pgadmin` service runs PgAdmin4. It is configured to auto-restart the container if it crashes.
- url: `http://localhost:5050`
- username: `pgadmin4@pgadmin.org`
- password: `admin`
### Add a new server in PgAdmin
- host name/address: `postgres`
- port: `5432`
- username: `postgres`
- password: `changeme`