forked from asaikali/docker-compose-postgres
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
40 lines (36 loc) · 1.03 KB
/
docker-compose.yml
File metadata and controls
40 lines (36 loc) · 1.03 KB
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
version: '3.7'
volumes:
postgres:
pgadmin:
services:
postgres:
container_name: demo_postgres
image: "postgres:12"
environment:
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "password"
PGDATA: "/data/postgres"
volumes:
- postgres:/data/postgres
- ./docker_postgres_init.sql:/docker-entrypoint-initdb.d/docker_postgres_init.sql
ports:
- "15432:5432"
restart: unless-stopped
pgadmin:
container_name: demo_pgadmin
image: "dpage/pgadmin4:4.24"
environment:
PGADMIN_DEFAULT_EMAIL: admin
PGADMIN_DEFAULT_PASSWORD: admin
PGADMIN_CONFIG_SERVER_MODE: "False"
PGADMIN_CONFIG_MASTER_PASSWORD_REQUIRED: "False"
volumes:
- pgadmin:/var/lib/pgadmin
- ./docker_pgadmin_servers.json:/pgadmin4/servers.json
ports:
- "15433:80"
entrypoint:
- "/bin/sh"
- "-c"
- "/bin/echo 'postgres:5432:*:postgres:password' > /tmp/pgpassfile && chmod 600 /tmp/pgpassfile && /entrypoint.sh"
restart: unless-stopped