-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
97 lines (97 loc) · 2.74 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
version: "3"
services:
arangodb:
image: arangodb:3.11.1
environment:
- ARANGO_ROOT_PASSWORD=test123
ports:
- 8529:8529
volumes:
- ${BASE_FOLDER}\arangodbbackup:/var/lib/arangodb3
qdrant:
image: qdrant/qdrant:latest
ports:
- 6333:6333
volumes:
- ${BASE_FOLDER}\qdrant:/qdrant/storage
semgrep:
image: returntocorp/semgrep:latest
volumes:
- ${CODEBASE_DIR}:/src
- ${BASE_FOLDER}\security-output:/output
command:
- sh
- -c
- |
semgrep --config=auto --json --output=/output/scan_results.json
code-embeddings:
image: code-embeddings:latest
environment:
- OPENAI_API_KEY=${OPENAI_API_KEY}
- ARANGODB_URL=http://arangodb:8529
- QDRANT_URL=http://qdrant:6333
- ARANGODB_NAME=code-embedding
ports:
- 3000:3000
command:
- sh
- -c
- |
./wait-for-arangodb.sh arangodb 8529 root test123 &&
./wait-for-qdrant.sh qdrant 6333 &&
curl -X DELETE http://host.docker.internal:6333/collections/code &&
npm install &&
node main.js
code-aid:
depends_on:
- code-embeddings
image: code-aid:latest
working_dir: /code-aid-parser
environment:
- args_include=*.java
- args_parsedjson=/code-aid-parser-output
- args_output=/${OUTPUT_DIR_NAME}
- args_input=/input
- args_codeembeddingscollection=code
- FILTER=*.java
- INPUT_DIR=/input
- OUTPUT_DIR=/code-aid-parser-output
- datasources_arangodb_host=arangodb
- args_codeembeddingsurl=http://code-embeddings:3000
volumes:
- ${CODEBASE_DIR}:/input
- ${BASE_FOLDER}\${OUTPUT_DIR_NAME}:/${OUTPUT_DIR_NAME}
command:
- sh
- -c
- |
rm -rf /${OUTPUT_DIR_NAME}/ready &&
npm ci &&
node src/main.js &&
cd /code-aid &&
java -jar app.jar &&
touch /${OUTPUT_DIR_NAME}/ready
code-aid-site:
depends_on:
- code-aid
image: code-aid-site:latest
ports:
- 1313:1313
volumes:
- ${BASE_FOLDER}\${OUTPUT_DIR_NAME}:/code-aid-site/content/en/docs/Code/${OUTPUT_DIR_NAME}
- ${BASE_FOLDER}\security-output:/security-issues
- ${BASE_FOLDER}\public:/code-aid-site/public
command:
- sh
- -c
- |
./wait-for-code-aid-finish.sh /code-aid-site/content/en/docs/Code/${OUTPUT_DIR_NAME}/ready &&
./generate-architecture-diagram.sh ${OUTPUT_DIR_NAME} &&
./generate-security-issues.sh ${OUTPUT_DIR_NAME} &&
cd /code-aid-site &&
npm install &&
echo "Generating site..." &&
hugo &&
cp -r /code-aid-site/static/webfonts /code-aid-site/public
echo "Site generated" &&
hugo server --bind 0.0.0.0