-
Notifications
You must be signed in to change notification settings - Fork 17
/
docker-compose.yml
100 lines (96 loc) · 2.29 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'
services:
nginx:
build:
context: ./
dockerfile: docker/Dockerfile-nginx
image: 127.0.0.1:5000/malgazer-nginx
ports:
- "80:80"
- "443:443"
depends_on:
- api
- web
- db
- portainer
env_file:
- ./.env
healthcheck:
test: ["CMD", "curl", "-f", "-k", "https://localhost/nginx-health"]
interval: 1m30s
timeout: 10s
retries: 5
volumes:
- ./docker/logs/nginx:/var/log/nginx
- ./docker/files/nginx/nginx.conf:/etc/nginx/nginx.conf
- ./docker/files/nginx/server.key:/etc/nginx/server.key
- ./docker/files/nginx/server.cert:/etc/nginx/server.cert
api:
build:
context: ./
dockerfile: docker/Dockerfile-base
image: 127.0.0.1:5000/malgazer-api
depends_on:
- db
# ports:
# - "8888:8888"
volumes:
- ./docker/files/api/entrypoint.sh:/entrypoint.sh
- .:/malgazer
- ./docker/logs/api:/logs
- ./samples:/samples
- ./classifier:/classifier
env_file:
- ./.env
deploy:
replicas: ${MALGAZER_API_REPLICAS}
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8888/healthcheck"]
interval: 1m30s
timeout: 10s
retries: 5
# entrypoint: ["sh", "-c", "sleep infinity"]
web:
image: 127.0.0.1:5000/malgazer-api
depends_on:
- db
- api
# ports:
# - "8080:8080"
volumes:
- ./docker/files/web/entrypoint.sh:/entrypoint.sh
- .:/malgazer
- ./docker/logs/web:/logs
- ./samples:/samples
env_file:
- ./.env
deploy:
replicas: ${MALGAZER_WEB_REPLICAS}
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/healthcheck"]
interval: 1m30s
timeout: 10s
retries: 5
# entrypoint: ["sh", "-c", "sleep infinity"]
db:
image: postgres:latest
volumes:
- ./docker/db:/var/lib/postgresql/data
env_file:
- ./.env
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
portainer:
image: portainer/portainer
# ports:
# - "9000:9000"
command: -H unix:///var/run/docker.sock
volumes:
- /var/run/docker.sock:/var/run/docker.sock
# - portainer_data:/data
#
#volumes:
# portainer_data: