forked from mario-gellrich-zhaw/python_postgresql_pgadmin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
40 lines (37 loc) · 1022 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
40 lines (37 loc) · 1022 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
services:
db:
build:
context: .
dockerfile: Dockerfile
container_name: postgres_container
environment:
POSTGRES_DB: postgres
POSTGRES_USER: pgadmin
POSTGRES_PASSWORD: geheim
volumes:
- db_data:/var/lib/postgresql/data
- ./init-db.sql:/docker-entrypoint-initdb.d/init-db.sql
ports:
- "5432:5432"
restart: unless-stopped
pgadmin:
image: dpage/pgadmin4:latest
container_name: pgadmin_container
environment:
PGADMIN_DEFAULT_EMAIL: pgadmin@gmail.com
PGADMIN_DEFAULT_PASSWORD: geheim
PGADMIN_CONFIG_WTF_CSRF_HEADERS: '["Referer", "Origin"]'
PGADMIN_CONFIG_WTF_CSRF_ENABLED: 'False'
PGADMIN_CONFIG_SERVER_MODE: 'False'
PGADMIN_CONFIG_MASTER_PASSWORD_REQUIRED: 'False'
volumes:
- pgadmin_data:/var/lib/pgadmin
- ./.devcontainer/servers.json:/pgadmin4/servers.json
ports:
- "5050:80"
restart: unless-stopped
depends_on:
- db
volumes:
db_data:
pgadmin_data: