-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
100 lines (89 loc) · 2 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
version: "3.8"
services:
database:
ports:
- 5432:5432
build:
context: ./Docker
dockerfile: database.Dockerfile
environment:
- POSTGRES_USER=samrat
- POSTGRES_PASSWORD=Samrat@1234
- POSTGRES_DB=inbound
volumes:
- ./db:/var/lib/postgresql/data/
networks:
- network2
redis:
ports:
- 6359:6379
image: redis
restart: always
volumes:
- cache:/data
command: redis-server --save 20 1 --loglevel warning
networks:
- network2
backend:
build: ./inbound-backend
command: bash -c "supervisord -c /supervisord.conf"
ports:
- 8100:8000
depends_on:
- database
- redis
volumes:
- type: bind
source: ./inbound-backend
target: /app
read_only: false
# Mount 'supervisor.d' as its namesake in the root of the container
- type: volume
source: supervisor.d
target: /supervisor.d
read_only: false
# Mount 'web_server_logs' as its namesake in the root of the container
- type: volume
source: web_server_logs
target: /web_server_logs
read_only: false
# Mount '.history' as its namesake in the root of the container
- type: volume
source: .history
target: /.history
read_only: false
restart: on-failure:2
environment:
- REDIS_HOST=redis
- REDIS_PORT=6379
networks:
- network2
frontend:
build: ./inbound-frontend
stdin_open: true
tty: true
ports:
- 3100:3000
depends_on:
- database
- backend
- redis
volumes:
- type: bind
source: ./inbound-frontend
target: /app
read_only: false
networks:
- network2
volumes:
db:
cache:
web_server_logs:
# This volume is for static files of backend
static_backend:
# This volume contains the supervisor.d conf files
supervisor.d:
# This volume contains the history files
.history:
networks:
network2: