-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
56 lines (49 loc) · 1.43 KB
/
docker-compose.yml
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
version: '3.9'
secrets:
pgpass:
file: ./pgpass
services:
postgres:
image: lovelysystems/docker-postgres:dev
ports:
- "5432:5432"
environment:
POSTGRES_PASSWORD: postgres
volumes:
# bind mount the data volume
- "./volumes/postgres/data:/var/lib/postgresql/data"
# map the bootstrap file into the init folder
# this will be evaluated in the created database upon first startup
- "./bootstrap.sql:/docker-entrypoint-initdb.d/bootstrap.sql:ro"
# configure shared library preload for the debugger extension
command:
- '-c'
- 'shared_preload_libraries=plugin_debugger'
# pgadmin listening on http://localhost:1080
pgadmin:
image: dpage/pgadmin4:6.3
depends_on:
- postgres
secrets:
# the pass file to use with the pre configured server
- source: pgpass
mode: 600
target: /var/lib/pgadmin/storage/admin/pgpass
environment:
PGADMIN_DEFAULT_EMAIL: admin@example.com
PGADMIN_DEFAULT_PASSWORD: admin
volumes:
# local storage for pgadmin
- ./volumes/pgadmin/data:/var/lib/pgadmin
# the server definition file, only read on first start
- ./servers.json:/pgadmin4/servers.json:ro
ports:
- "1080:80"
client:
image: lovelysystems/docker-postgres:dev-client
profiles:
- manual
environment:
PGHOST: postgres
PGUSER: postgres
PGPASSWORD: postgres