Skip to content

Commit 7a4540d

Browse files
committed
add docker file for development postgres
1 parent 38902be commit 7a4540d

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

.gitignore

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Binaries for programs and plugins
2+
*.exe
3+
*.exe~
4+
*.dll
5+
*.so
6+
*.dylib
7+
8+
# Test binary, built with `go test -c`
9+
*.test
10+
11+
# Output of the go coverage tool, specifically when used with LiteIDE
12+
*.out
13+
14+
# Dependency directories (remove the comment below to include it)
15+
# vendor/
16+
17+
# docker postgres
18+
.docker

docker-compose.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
version: '3.7'
2+
services:
3+
db1:
4+
image: postgres:latest
5+
volumes:
6+
- ./.docker/db1/postgres/:/var/lib/postgresql/data
7+
environment:
8+
POSTGRES_USER: 'postgres'
9+
POSTGRES_PASSWORD: 'postgres'
10+
POSTGRES_DB: sandbox
11+
ports:
12+
- '5433:5432' # 5433 port
13+
db2:
14+
image: postgres:latest
15+
volumes:
16+
- ./.docker/db2/postgres/:/var/lib/postgresql/data
17+
environment:
18+
POSTGRES_USER: 'postgres'
19+
POSTGRES_PASSWORD: 'postgres'
20+
POSTGRES_DB: sandbox
21+
ports:
22+
- '5434:5432' # 5434 port

0 commit comments

Comments
 (0)