-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
55 lines (53 loc) · 1.02 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
version: "2.2"
services:
app:
env_file:
- .env.development
environment:
- DATABASE_HOST=postgres
container_name: hhp-nestjs-app
restart: always
build:
context: .
dockerfile: Dockerfile.dev
ports:
- "3000:3000"
links:
- postgres
volumes:
- ./:/usr/src/app
- /usr/src/app/node_modules
deploy:
resources:
limits:
cpus: '1'
memory: 512M
reservations:
cpus: '1'
memory: 128M
postgres:
image: postgres
container_name: postgres
restart: always
environment:
POSTGRES_PASSWORD: postgres
ports:
- "5432:5432"
volumes:
- postgres:/data/postgres
- ./init-data.sh:/docker-entrypoint-initdb.d/init-data.sh
env_file:
- .env.development
deploy:
resources:
limits:
cpus: '1'
memory: 1G
reservations:
cpus: '1'
memory: 1G
volumes:
app:
driver: local
postgres:
driver: local