1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-25 02:04:06 +02:00

add postgres

This commit is contained in:
kev 2016-12-07 09:35:42 +08:00
parent f81e1a232e
commit 321d8a863d
3 changed files with 45 additions and 0 deletions

View File

@ -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

33
postgres/README.md Normal file
View File

@ -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
```

View File

@ -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