Skip to content

Commit ad87f8f

Browse files
committed
compose with postgres
1 parent d6a010e commit ad87f8f

File tree

2 files changed

+45
-1
lines changed

2 files changed

+45
-1
lines changed

.gitignore

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,8 @@
1+
# VSCode
12
.vscode
2-
ca-spring-multimodule.code-workspace
3+
*.code-workspace
4+
5+
# IntelliJ
6+
.idea
7+
*.iml
8+
.project
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#docker run --name local-postgres --mount source=local-postgres,target=/var/lib/postgresql/data --network=pgadmin-network -e POSTGRES_PASSWORD=postgres -p -p 5432:5432/tcp -d postgres
2+
3+
services:
4+
local-postgres:
5+
image: postgres
6+
environment:
7+
POSTGRES_DB: caspringmultimodule
8+
POSTGRES_USER: postgres
9+
POSTGRES_PASSWORD: postgres
10+
PGDATA: /data/postgres
11+
volumes:
12+
- postgres:/data/postgres
13+
ports:
14+
- "5432:5432"
15+
networks:
16+
- postgres
17+
restart: unless-stopped
18+
19+
pgadmin:
20+
image: dpage/pgadmin4
21+
environment:
22+
PGADMIN_DEFAULT_EMAIL: [email protected]
23+
PGADMIN_DEFAULT_PASSWORD: admin
24+
volumes:
25+
- pgadmin:/var/lib/pgadmin
26+
ports:
27+
- "5050:80"
28+
networks:
29+
- postgres
30+
restart: unless-stopped
31+
32+
networks:
33+
postgres:
34+
driver: bridge
35+
36+
volumes:
37+
postgres:
38+
pgadmin:

0 commit comments

Comments
 (0)