-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathdocker-compose.yml
92 lines (88 loc) · 3.28 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
---
# Variables (all with default values)
# - REDIS_VERSION
# - MEGALINTER_SERVER_VERSION
# - MEGALINTER_WORKER_VERSION
# - CODETOTAL_SERVER_IMAGE
# - CODETOTAL_SERVER_VERSION
version: "3"
services:
# Redis server to manage request queues and results
megalinter_server_redis:
image: "redis:${REDIS_VERSION:-7.0.11-alpine}"
ports:
- "6379:6379"
volumes:
- ./redis:/data
# Server to receive requests and post them in redis queue
megalinter_server_api:
image: "ghcr.io/oxsecurity/megalinter-server:${MEGALINTER_SERVER_VERSION:-beta}"
command: uvicorn server.server:app --host 0.0.0.0 --port 8000
environment:
- MEGALINTER_SERVER_REDIS_HOST=megalinter_server_redis
- MEGALINTER_SERVER_REDIS_PORT=6379
- MEGALINTER_SERVER_REDIS_QUEUE=megalinter:queue:requests
ports:
- "8000:8000"
depends_on:
- megalinter_server_redis
links:
- megalinter_server_redis
volumes:
- ./server-files:/tmp/server-files
# Worker to process requests and post results in redis stream or pubsub
megalinter_server_worker:
image: "ghcr.io/oxsecurity/megalinter-worker-security:${MEGALINTER_WORKER_VERSION:-latest}"
environment:
# ignore tool
- DISABLE_LINTERS=REPOSITORY_SYFT,REPOSITORY_DUSTILOCK
- FLAVOR_SUGGESTIONS=false
- LOG_LEVEL=DEBUG # Activate to have output commands in logs
- REPOSITORY_TRUFFLEHOG_ARGUMENTS=--json
- REPOSITORY_TRUFFLEHOG_COMMAND_REMOVE_ARGUMENTS=--only-verified
# Worker variables
- MEGALINTER_SERVER=true
- MEGALINTER_SERVER_REDIS_HOST=megalinter_server_redis
- MEGALINTER_SERVER_REDIS_PORT=6379
- MEGALINTER_SERVER_REDIS_QUEUE=megalinter:queue:requests
- MEGALINTER_SERVER_WORKER_POOL=true # Uncomment to try worker pool (beta), to have multiple jobs processed by the same worker
- MEGALINTER_SERVER_WORKER_POOL_NUMBER=5 # If worker pool active, number of parallel threads in the worker
# Redis Reporter info: can be different than Redis job Queue server
- REDIS_REPORTER=true
- REDIS_REPORTER_HOST=megalinter_server_redis
- REDIS_REPORTER_PORT=6379
depends_on:
- megalinter_server_redis
links:
- megalinter_server_redis
volumes:
- ./server-files:/tmp/server-files
# CodeTotal Server
code_total_server:
image: "${CODETOTAL_SERVER_IMAGE:-ghcr.io/oxsecurity/codetotal-server}:${CODETOTAL_SERVER_VERSION:-latest}"
environment:
- NODE_ENV=production
# MEGALINTER API
- MEGALINTER_ANALYSIS_URL=http://megalinter_server_api:8000/analysis
- MEGALINTER_UPLOAD_URL=http://megalinter_server_api:8000/upload-file
# MEGALINTER REDIS
- MEGALINTER_REDIS_URL=redis://megalinter_server_redis:6379
- MEGALINTER_REDIS_CHANNEL=megalinter:pubsub:<request-id>
# BACKEND
- CODETOTAL_HTTP_PORT=8081
- CODETOTAL_HTTP_HOST=0.0.0.0
- CODETOTAL_WS_PORT=8080
- CODETOTAL_WS_HOST=0.0.0.0
- DEBUG_MODULES=actions,megalinter,stores,transport
# FRONTEND
- CODETOTAL_UPLOAD_FILE_LIMIT_BYTES=10000000
ports:
- "8081:8081"
- "8080:8080"
depends_on:
- megalinter_server_redis
- megalinter_server_api
- megalinter_server_worker
links:
- megalinter_server_redis
- megalinter_server_api