-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
147 lines (137 loc) · 3.04 KB
/
docker-compose.yml
File metadata and controls
147 lines (137 loc) · 3.04 KB
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
services:
vimi.backend:
image: vimi-backend:latest
build:
context: .
dockerfile: backend/backend.Dockerfile
container_name: vimi-backend
env_file:
- backend/backend.env
volumes:
- backend:/root/.keras/
restart: always
pull_policy: build
ports:
- "127.0.0.1:8000:8000"
depends_on:
vimi.database:
condition: service_healthy
vimi.cache:
condition: service_started
vimi.ftp-server:
condition: service_started
networks:
- backend-net
- frontend-net
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [ gpu ]
healthcheck:
test: [ "CMD-SHELL", "sh -c 'curl --fail http://localhost:8000/api/1/health/ || exit 1'" ]
interval: 30s
timeout: 10s
vimi.frontend:
image: vimi-frontend:latest
build:
context: .
dockerfile: ./frontend/frontend.Dockerfile
container_name: vimi-frontend
env_file:
- frontend/frontend.env
restart: always
pull_policy: build
ports:
- "127.0.0.1:80:80"
depends_on:
vimi.backend:
condition: service_healthy
networks:
- frontend-net
vimi.database:
image: vimi-database:latest
build:
context: .
dockerfile: database/database.Dockerfile
container_name: vimi-database
user: postgres
env_file:
- database/database.env
volumes:
- database:/var/lib/postgresql/data
restart: always
pull_policy: build
ports:
- "127.0.0.1:5432:5432"
networks:
- backend-net
healthcheck:
test: [ "CMD-SHELL", "sh -c 'pg_isready -d $$POSTGRES_DB -U $$POSTGRES_USER'" ]
interval: 30s
timeout: 60s
vimi.cache:
image: vimi-cache:latest
build:
context: .
dockerfile: cache/cache.Dockerfile
container_name: vimi-cache
env_file:
- cache/cache.env
volumes:
- cache:/data
restart: always
pull_policy: build
ports:
- "127.0.0.1:6379:6379"
networks:
- backend-net
vimi.ftp-server:
image: vimi-ftp-server:latest
build:
context: .
dockerfile: ./ftp-server/ftp-server.Dockerfile
container_name: vimi-ftp-server
env_file:
- ftp-server/ftp-server.env
volumes:
- ftp-server:/upload
restart: always
pull_policy: build
ports:
- "127.0.0.1:21:21"
- "127.0.0.1:21000-21010:21000-21010"
networks:
- backend-net
volumes:
backend:
driver: local
driver_opts:
type: none
device: ./.containers/backend
o: bind
database:
driver: local
driver_opts:
type: none
device: ./.containers/database
o: bind
cache:
driver: local
driver_opts:
type: none
device: ./.containers/cache
o: bind
ftp-server:
driver: local
driver_opts:
type: none
device: ./.containers/ftp-server
o: bind
networks:
backend-net:
driver: bridge
frontend-net:
driver: bridge