generated from NodeFactoryIo/node-ts-starter
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
31 lines (31 loc) · 870 Bytes
/
docker-compose.yml
File metadata and controls
31 lines (31 loc) · 870 Bytes
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
version: "3.4"
services:
backend:
build:
context: .
target: dev
command: sh -c "yarn run nodemon"
image: nodefactory/nodejs-ts-starter:${IMAGE_TAG:-latest}
container_name: "${BACKEND_CONTAINER_NAME:-nodejs-backend}"
depends_on:
- db
volumes:
- .:/usr/app
- node_modules:/usr/app/node_modules
ports:
- "${BACKEND_LOCAL_PORT:-3000}:${SERVER_PORT:-3000}"
- "${DEBUG_PORT:-56745}:56745"
db:
image: postgres:12-alpine
volumes:
- postgres:/var/lib/postgresql/data
container_name: "${DB_CONTAINER_NAME:-nodejs-db}"
environment:
- POSTGRES_USER=${TYPEORM_USER:-nodefactory}
- POSTGRES_PASSWORD=${TYPEORM_PASSWORD:-nodefactory}
- POSTGRES_DB=${TYPEORM_DATABASE:-nodefactory}
ports:
- ${DB_LOCAL_PORT:-9999}:5432
volumes:
node_modules:
postgres: