-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
72 lines (68 loc) · 1.44 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# version: '3.9'
# services:
# nestapp_postgres:
# container_name: nestapp_postgres
# image: nguyentanhung/nestapp:1.0.0
# build: .
# ports:
# - '8000:8000'
# environment:
# - NODE_ENV=development
# - DB_TYPE=postgres
# - PG_USER=postgres
# - PG_PASSWORD=postgres
# - PG_DB=postgres
# - PG_PORT=5432
# - PG_HOST=db
# depends_on:
# - db
# db:
# container_name: db_postgres
# restart: always
# image: postgres:12
# environment:
# POSTGRES_USER: postgres
# POSTGRES_PASSWORD: postgres
# POSTGRES_DB: postgres
# ports:
# - '5432:5432'
# volumes:
# - pgdata:/var/lib/postgresql/data
# volumes:
# pgdata: {}
version: '3.5'
services:
db:
image: postgres
restart: always
environment:
- POSTGRES_PASSWORD=postgres
container_name: postgres
volumes:
- ./pgdata:/var/lib/postgresql/data
ports:
- '5432:5432'
app:
build:
context: .
dockerfile: Dockerfile
container_name: nest-docker-postgres
environment:
- PORT=${PORT}
ports:
- '3000:3000'
depends_on:
- db
volumes:
- ./src:/app/src
pgadmin:
image: dpage/pgadmin4
restart: always
container_name: nest-pgadmin4
environment:
- PGADMIN_DEFAULT_PASSWORD=pgadmin4
ports:
- '5050:80'
depends_on:
- db