-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
49 lines (45 loc) · 1.02 KB
/
docker-compose.yml
File metadata and controls
49 lines (45 loc) · 1.02 KB
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
version: '3'
services:
api:
image: node:12.16.1
volumes:
- .:/usr/src/api
# node modules and build folders changes
# have no effect on project folders
- nodemodules:/usr/src/api/node_modules
- nestdist:/usr/src/api/dist
working_dir: /usr/src/api/
environment:
- PORT=3000
- NODE_ENV=development
- DB_HOST=postgres
- DB_PORT=5432
- DB_USER=postgres
- DB_PASSWORD=postgres
- DB_DATABASE=my_database
- TYPEORM_DRIVER_EXTRA='{"ssl":false}'
ports:
- 5000:3000
depends_on:
- postgres
command: bash -c "npm install && npm run start:debug"
postgres:
image: postgres:11.4-alpine
restart: always
volumes:
- db-data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=my_database
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
ports:
- 5433:5432
adminer:
image: adminer
restart: always
ports:
- 8080:8080
volumes:
db-data:
nodemodules:
nestdist: