-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
91 lines (85 loc) · 1.98 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
version: '3'
services:
front-envoy:
build: ./api-gateway
container_name: api-gateway
networks:
- awesome
ports:
- 8080:8080 # API port for client request
- 8001:8001 # Admin port
scanner:
build: ./scanner/
container_name: scanner
environment:
- MYSQL_DATABASE=vulnerability
- MYSQL_HOST=mysql
- MYSQL_PORT=3306
- MYSQL_USER=ohyeah
- MYSQL_PASSWORD=ohyeah123!
ports:
- 127.0.0.1:8090:8090 # Scanner service port
restart: on-failure
volumes:
- .:/cmd/scanner/scanner
depends_on:
- mysql
networks:
- awesome
insight:
build: ./insight/
container_name: insight
environment:
- MYSQL_DATABASE=vulnerability
- MYSQL_HOST=mysql
- MYSQL_PORT=3306
- MYSQL_USER=ohyeah
- MYSQL_PASSWORD=ohyeah123!
ports:
- 127.0.0.1:9000:9000 # Insight service port
restart: on-failure
volumes:
- .:/cmd/insight/insight
depends_on:
- mysql
networks:
- awesome
mysql:
platform: linux/x86_64 # I'm using M1 Pro
image: mysql:8.0
container_name: mysql
ports:
- 127.0.0.1:3306:3306
environment:
- MYSQL_ROOT_PASSWORD=ohyeah123!
- MYSQL_DATABASE=vulnerability
- MYSQL_USER=ohyeah
- MYSQL_PASSWORD=ohyeah123!
volumes:
- mysql:/var/lib/mysql
- ./storage/mysql/clean_up_tables.sql:/docker-entrypoint-initdb.d/clean_up_tables.sql
- ./storage/mysql/create_tables.sql:/docker-entrypoint-initdb.d/create_tables.sql
networks:
- awesome
phpmyadmin:
image: phpmyadmin/phpmyadmin
container_name: phpmyadmin
depends_on:
- mysql
links:
- mysql
environment:
- PMA_HOST=mysql
- PMA_PORT=3306
ports:
- 127.0.0.1:9090:80
restart: always
networks:
- awesome
volumes:
scanner:
mysql:
# Networks to be created to facilitate communication between containers
networks:
awesome:
driver: bridge