-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
60 lines (56 loc) · 1.22 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
56
57
58
59
60
services:
db:
image: postgres:latest
container_name: dapp-for-business_db_1
networks:
- dapp-for-business_dapp-network
environment:
POSTGRES_USER: Alex
POSTGRES_PASSWORD: avtb140985
POSTGRES_DB: HB3A
ports:
- "5432:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U Alex -d HB3A"]
interval: 10s
timeout: 5s
retries: 5
backend:
build: .
image: node:16
container_name: dapp-node
networks:
- dapp-for-business_dapp-network
depends_on:
db:
condition: service_healthy
environment:
- NODE_ENV=development
- DATABASE_URL=postgres://Alex:avtb140985@db:5432/HB3A
ports:
- "5000:5000"
volumes:
- .:/app
working_dir: /app
command: "node server.js"
frontend:
build:
context: ./frontend
image: node:16
container_name: dapp-frontend
networks:
- dapp-for-business_dapp-network
ports:
- "3000:3000"
volumes:
- ./frontend:/app
working_dir: /app
command: "npm start"
volumes:
postgres-data:
grafana-data:
networks:
dapp-for-business_dapp-network:
external: true