-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
111 lines (105 loc) · 2.51 KB
/
docker-compose.yml
File metadata and controls
111 lines (105 loc) · 2.51 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
services:
detectish:
# image: matthl2002/detectish:latest
build:
context: .
dockerfile: Dockerfile
container_name: detectish
depends_on:
mysql:
condition: service_healthy
clamav:
condition: service_healthy
networks:
- detectish-network
ports:
- "6969:6969"
restart: unless-stopped
volumes:
- ./phishing_email_example:/app/phishing_email_example
env_file: .env
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:6969/health || exit 1"]
interval: 30s
timeout: 10s
retries: 10
start_period: 30s
# start_period is the time to wait before starting health checks
backend:
# image: matthl2002/detectish-backend:latest
build:
context: ./backend
dockerfile: Dockerfile
container_name: detectish-backend
depends_on:
mysql:
condition: service_healthy
clamav:
condition: service_healthy
detectish:
condition: service_healthy
networks:
- detectish-network
ports:
- "3000:3000"
restart: unless-stopped
env_file: .env
healthcheck:
test: ["CMD-SHELL", "wget -q -O - http://localhost:3000/backend-health || exit 1"]
interval: 30s
timeout: 10s
retries: 5
frontend:
# image: matthl2002/detectish-frontend:latest
build:
context: ./frontend
dockerfile: Dockerfile
container_name: detectish-frontend
depends_on:
backend:
condition: service_healthy
networks:
- detectish-network
ports:
- "80:80"
restart: unless-stopped
env_file: .env
healthcheck:
test: ["CMD-SHELL", "wget -q -O - http://localhost:80/frontend-health/index.json || exit 1"]
interval: 30s
timeout: 10s
retries: 5
clamav:
image: clamav/clamav:latest
container_name: clamav
ports:
- "3310:3310"
networks:
- detectish-network
healthcheck:
test: ["CMD-SHELL", "echo 'PING' | nc -w 5 localhost 3310"]
interval: 30s
timeout: 10s
retries: 5
restart: unless-stopped
mysql:
image: mysql:lts
container_name: mysql
env_file: .env
volumes:
- mysql-data:/var/lib/mysql
networks:
- detectish-network
ports:
- "3306:3306"
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 30s
timeout: 10s
retries: 5
restart: unless-stopped
volumes:
mysql-data:
networks:
detectish-network:
driver: bridge