Skip to content

Commit 5d62ec1

Browse files
committed
Add support for postgres
1 parent daa5ed9 commit 5d62ec1

2 files changed

Lines changed: 24 additions & 0 deletions

File tree

docker-compose.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,20 @@ services:
4343
MYSQL_PASSWORD: secret
4444
MYSQL_ROOT_PASSWORD: root
4545

46+
### PostgreSQL Container ####################################
47+
48+
postgres:
49+
build: ./postgres
50+
container_name: postgres
51+
volumes_from:
52+
- data
53+
ports:
54+
- "5432:5432"
55+
environment:
56+
POSTGRES_DB: homestead
57+
POSTGRES_USER: homestead
58+
POSTGRES_PASSWORD: secret
59+
4660
### Redis Container #########################################
4761

4862
redis:
@@ -60,6 +74,7 @@ services:
6074
container_name: data
6175
volumes:
6276
- /var/lib/mysql
77+
- /var/lib/postgresql/data
6378
- /var/lib/redis
6479

6580
### Add more Containers below ###############################

postgres/Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
FROM postgres:latest
2+
3+
MAINTAINER Ben M <git@bmagg.com>
4+
5+
VOLUME /var/lib/postgresql/data
6+
7+
CMD ["postgres"]
8+
9+
EXPOSE 5432

0 commit comments

Comments
 (0)