forked from guacsec/guac
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
141 lines (130 loc) · 3.91 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
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
version: "3"
services:
# Neo4j is turned down for now since we are currently only using the in memory backend
# neo4j:
# image: "neo4j:4.4.9-community"
# environment:
# NEO4J_AUTH: "neo4j/s3cr3t"
# NEO4J_apoc_export_file_enabled: true
# NEO4J_apoc_import_file_enabled: true
# NEO4J_apoc_import_file_use__neo4j__config: true
# NEO4JLABS_PLUGINS: '["apoc"]'
# ports:
# - "7474:7474"
# - "7687:7687"
# restart: on-failure
nats:
image: "nats:2.9.14"
command: "--config /config/nats/js.conf -m 8222"
ports:
- "4222:4222"
# monitoring port
- "8222:8222"
volumes:
- ./container_files/nats:/config/nats
restart: on-failure
# Due to the following issues, we have another container to perform the healthcheck
#
# TODO(lumjjb): I attempted to do health check for neo4j as well, but
# the service running via neo4j status is not a good indication of if
# the service is ready for incoming requests.
# TODO(lumjjb): no good way right now to do a healtcheck for nats-server since
# it doesn't have utilities within it to perform the check from the container
# itself.
service-health-1:
image: "local-healthcheck"
stdin_open: true
tty: true
command:
- /bin/bash
- -c
- |
echo "checking-for-services";
until curl -I http://nats:8222 > /dev/null 2>&1; do sleep 5; done;
echo "nats-up";
# Neo4j is turned down for now since we are currently only using the in memory backend
# until curl -I http://neo4j:7474> /dev/null 2>&1; do sleep 5; done;
# echo "neo4j-up";
guac-collectsub:
image: "local-organic-guac"
command: "/opt/guac/guaccsub"
working_dir: /guac
restart: on-failure
ports:
- "2782:2782"
depends_on:
service-health-1:
condition: service_completed_successfully
volumes:
- ./container_files/guac:/guac
guac-graphql:
image: "local-organic-guac"
command: "/opt/guac/guacgql"
working_dir: /guac
restart: on-failure
depends_on:
service-health-1:
condition: service_completed_successfully
ports:
- "8080:8080"
volumes:
- ./container_files/guac:/guac
# GUAC ingestor and oci collector are dependent on the collectsub service to be up
service-health-2:
image: "local-healthcheck"
stdin_open: true
tty: true
command:
- /bin/bash
- -c
- |
echo "checking-for-services";
until nc -z guac-collectsub 2782 > /dev/null 2>&1; do sleep 5; done;
echo "guac collectsub up";
until curl -I http://guac-graphql:8080/query > /dev/null 2>&1; do sleep 5; done;
echo "graphql up";
depends_on:
service-health-1:
condition: service_completed_successfully
guac-ingestor:
image: "local-organic-guac"
command: "/opt/guac/guacingest"
working_dir: /guac
restart: on-failure
depends_on:
service-health-2:
condition: service_completed_successfully
volumes:
- ./container_files/guac:/guac
oci-collector:
image: "local-organic-guac"
command: "/opt/guac/guaccollect image"
working_dir: /guac
restart: on-failure
depends_on:
service-health-2:
condition: service_completed_successfully
volumes:
- ./container_files/guac:/guac
depsdev-collector:
image: "local-organic-guac"
command: "/opt/guac/guaccollect deps_dev"
working_dir: /guac
restart: on-failure
environment:
- DEPS_DEV_APIKEY
depends_on:
service-health-2:
condition: service_completed_successfully
volumes:
- ./container_files/guac:/guac
osv-certifier:
image: "local-organic-guac"
command: "/opt/guac/guacone certifier osv"
working_dir: /guac
restart: on-failure
depends_on:
service-health-2:
condition: service_completed_successfully
volumes:
- ./container_files/guac:/guac