-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
46 lines (45 loc) · 959 Bytes
/
docker-compose.yml
File metadata and controls
46 lines (45 loc) · 959 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Setting up node and postgres containers
version: "3"
services:
# Node container
node:
container_name: synoptic-node
build: node/
volumes:
- ./node:/node
- /node/node_modules
env_file:
- .env
ports:
- "8080:8080"
command: sh -c "npm install && npm run start.dev"
depends_on:
- db
# Postgres container
db:
container_name: synoptic-db
image: postgres
restart: always
ports:
- "5432:5432"
environment:
POSTGRES_DB: synoptic
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
# Persisting data
volumes:
- db-data:/var/lib/postgresql/data
- ./database:/docker-entrypoint-initdb.d/
# ngrok container
ngrok:
image: wernight/ngrok
container_name: ngrok
environment:
- NGROK_AUTHTOKEN=${NGROK_AUTHTOKEN}
- NGROK_PORT=node:8080
depends_on:
- node
ports:
- "4040:4040"
volumes:
db-data: