-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathdocker-compose.yml
39 lines (36 loc) · 1.22 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
version: '3.8' # Specify Docker Compose version
services:
postgres:
image: postgres:15.1-alpine
ports:
- "5432:5432"
environment:
- POSTGRES_DB=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_USER=postgres
command:
- "postgres"
- "-c"
- "wal_level=logical"
- "-c"
- "wal_compression=on"
volumes:
- ./docker/postgres/init.sql:/docker-entrypoint-initdb.d/init.sql
pgadmin:
container_name: pgadmin_container
image: dpage/pgadmin4
environment:
- PGADMIN_DEFAULT_EMAIL=${PGADMIN_DEFAULT_EMAIL:[email protected]}
- PGADMIN_DEFAULT_PASSWORD=${PGADMIN_DEFAULT_PASSWORD:-postgres}
- PGADMIN_CONFIG_SERVER_MODE=False
- PGADMIN_CONFIG_MASTER_PASSWORD_REQUIRED=False
ports:
- "${PGADMIN_PORT:-5050}:80"
entrypoint: /bin/sh -c "chmod 600 /pgpass; /entrypoint.sh;"
user: root
volumes:
- ./docker/pgAdmin/pgpass:/pgpass
- ./docker/pgAdmin/servers.json:/pgadmin4/servers.json
depends_on:
- postgres
restart: unless-stopped