-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
34 lines (33 loc) · 915 Bytes
/
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
# docker-compose.yml
version: "3"
services:
app:
restart: on-failure
build: .
depends_on:
- postgres
env_file: ./.env
ports:
- $NODE_LOCAL_PORT:$NODE_DOCKER_PORT
command: sh -c "node ./server/built/app.js"
environment:
- DB_HOST=postgres
- DB_USER=$POSTGRES_USER
- DB_PASSWORD=$POSTGRES_PASSWORD
- DB_NAME=$POSTGRES_DB
- DB_PORT=$POSTGRES_DB_DOCKER_PORT
- DATABASE_URL=postgres://$POSTGRES_USER:$POSTGRES_PASSWORD@postgres:$POSTGRES_DB_DOCKER_PORT/$POSTGRES_DB
volumes:
- .:/app
- /app/server/node_modules/
postgres:
image: postgres:11
env_file: ./.env
ports:
- $POSTGRES_DB_LOCAL_PORT:$POSTGRES_DB_DOCKER_PORT
environment:
POSTGRES_USER: $POSTGRES_USER
POSTGRES_PASSWORD: $POSTGRES_PASSWORD
POSTGRES_DB: $POSTGRES_DB
volumes:
- ./server/data:/var/lib/postgresql/data