diff --git a/README.md b/README.md index 9cd7b21..f7d6b59 100644 --- a/README.md +++ b/README.md @@ -238,6 +238,7 @@ A collection of delicious docker recipes. - [x] neo4j - [x] owncloud - [x] phpmyadmin +- [x] postgres - [x] registry - [x] rocket.chat - [x] scrapinghub/splash diff --git a/postgres/README.md b/postgres/README.md new file mode 100644 index 0000000..7c06021 --- /dev/null +++ b/postgres/README.md @@ -0,0 +1,33 @@ +postgres +======== + +![](https://www.postgresql.org/media/img/docs/hdr_logo.png) + +## docker-compose.yml + +```yaml +postgres: + image: postgres:alpine + ports: + - "5432:5432" + environment: + - POSTGRES_USER=root + - POSTGRES_PASSWORD=root + - POSTGRES_DB=postgres + restart: always +``` + +## up and running + +```bash +$ docker-compose up -d + +$ docker-compose exec postgres psql postgres +>>> SELECT CURRENT_TIMESTAMP; + now +------------------------------- + 2016-12-07 01:44:29.872928+00 +(1 row) + +>>> \q +``` diff --git a/postgres/docker-compose.yml b/postgres/docker-compose.yml new file mode 100644 index 0000000..ab56159 --- /dev/null +++ b/postgres/docker-compose.yml @@ -0,0 +1,11 @@ +postgres: + image: postgres:alpine + ports: + - "5432:5432" + volumes: + - ./data:/var/lib/postgresql/data + environment: + - POSTGRES_USER=root + - POSTGRES_PASSWORD=root + - POSTGRES_DB=postgres + restart: always