-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
41 lines (39 loc) · 1.04 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
version: '3.7'
services:
postgres:
# hostname: pgsql
container_name: postgres
image: "postgres:alpine"
# image: postgres:11-alpine
# image: postgres:10-alpine
# image: postgres:9.6-alpine
environment:
#POSTGRES_HOST_AUTH_METHOD: "trust"
#POSTGRES_DB: ${DB_NAME:-sample}
POSTGRES_USER: ${DB_USERNAME:-postgres}
POSTGRES_PASSWORD: ${DB_PASSWORD:-postgres}
volumes:
- pgsqldata:/var/lib/postgresql/data
ports:
- "${DB_PORT:-25432}:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
# restart: always
restart: unless-stopped
pgadmin:
container_name: pgadmin
image: dpage/pgadmin4
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL:[email protected]}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD:-admin}
volumes:
- pgadmin:/root/.pgadmin
ports:
- "${PGADMIN_PORT:-5050}:80"
restart: unless-stopped
volumes:
pgsqldata:
pgadmin: