-
Notifications
You must be signed in to change notification settings - Fork 87
/
Copy pathdocker-compose-postgres.yml
61 lines (56 loc) · 1.34 KB
/
docker-compose-postgres.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
57
58
59
60
61
name: cnpmcore_dev_services_postgres
services:
redis:
env_file:
- .env
image: redis:6-alpine
# command: redis-server --appendonly yes --requirepass cnpm
restart: always
volumes:
- cnpm-redis:/data
ports:
- 6379:6379
networks:
- cnpm-postgres
postgres:
env_file:
- .env
image: postgres:17
restart: always
environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
ports:
- 5432:5432
networks:
- cnpm-postgres
volumes:
- cnpm-postgres:/var/lib/postgresql/data
# https://github.com/khezen/compose-postgres/blob/master/docker-compose.yml
pgadmin:
env_file:
- .env
image: dpage/pgadmin4
restart: always
environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL:[email protected]}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD:-admin}
PGADMIN_CONFIG_SERVER_MODE: 'False'
volumes:
- cnpm-pgadmin:/var/lib/pgadmin
ports:
- 8888:80
networks:
- cnpm-postgres
depends_on:
- postgres
volumes:
cnpm-redis:
cnpm-postgres:
cnpm-pgadmin:
networks:
cnpm-postgres:
name: cnpm-postgres
driver: bridge