-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
38 lines (35 loc) · 997 Bytes
/
Copy pathcompose.yaml
File metadata and controls
38 lines (35 loc) · 997 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
version: '3.7'
volumes:
postgres_data:
pgadmin_data:
services:
postgres:
container_name: spring_postgres
image: 'postgres:latest'
environment:
- 'POSTGRES_DB=mydatabase'
- 'POSTGRES_PASSWORD=secret'
- 'POSTGRES_USER=myuser'
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- '5432:5432'
restart: unless-stopped
pgadmin:
container_name: spring_pgadmin
image: dpage/pgadmin4:latest
environment:
PGADMIN_DEFAULT_EMAIL: admin@localhost.com
PGADMIN_DEFAULT_PASSWORD: admin
PGADMIN_LISTEN_PORT: 5050
PGADMIN_CONFIG_MODE: "False"
PGADMIN_CONFIG_MASTER_PASSWORD_REQUIRED: "False"
volumes:
- pgadmin_data:/var/lib/pgadmin
- ./docker_pgadmin_servers.json:/pgadmin4/servers.json:ro
ports:
- '5050:5050'
entrypoint:
- "/bin/sh"
- "-c"
- "/bin/echo 'postgres:5432:*dvega:password' > /tmp/pgpassfile && chmod 600 /tmp/pgpassfile && /entrypoint.sh"