-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose-postgres.yml
More file actions
43 lines (30 loc) · 897 Bytes
/
docker-compose-postgres.yml
File metadata and controls
43 lines (30 loc) · 897 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
version: '3.8' # Or your desired Compose file version
services:
postgres:
image: postgres
ports:
- "5432:5432"
environment:
POSTGRES_PASSWORD: password
POSTGRES_USER: postgres
POSTGRES_DB: dbstartup
volumes:
- ./volumes/postgres_data:/var/lib/postgresql #/var/lib/postgresql/data
pgadmin:
image: dpage/pgadmin4
ports:
- "5050:80"
environment:
PGADMIN_DEFAULT_EMAIL: user@example.com
PGADMIN_DEFAULT_PASSWORD: password
user: "${UID}:${GID}" # This line sets the user and group ID
volumes:
- ./volumes/pgadmin4_data:/var/lib/pgadmin # Named volume for persistence
depends_on:
- postgres
volumes:
postgres_data:
pgadmin4_data:
networks:
default:
driver: bridge