-
Notifications
You must be signed in to change notification settings - Fork 8
/
docker-compose-megalinter.yml
73 lines (66 loc) · 2.96 KB
/
docker-compose-megalinter.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
version: "3"
services:
# Redis server to manage request queues and results
megalinter_server_redis:
image: redis: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: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-ci_light:alpha # ci_light is lighter
#image: ghcr.io/oxsecurity/megalinter-worker-javascript:alpha # javascript projects
image: ghcr.io/oxsecurity/megalinter-worker-security:beta # cupcake is more complete
#image: ghcr.io/oxsecurity/megalinter-worker:alpha # all linters
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
# 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
# Use either of the following variables groups depending you want to use redis stream messages or pubsub
# Stream mode
#- REDIS_LINTER_REPORTER_METHOD=STREAM
#- REDIS_LINTER_REPORTER_STREAM=megalinter:stream:linter_results
# PubSub mode (by default so commented)
# - REDIS_REPORTER_METHOD=PUBSUB
# - REDIS_LINTER_REPORTER_METHOD=PUBSUB
# - REDIS_ERRORS_REPORTER_METHOD=PUBSUB
## You can force a channel. If not set, megalinter:pubsub:REQUEST_ID will be used (request_id is returned in initial POST body)
# - REDIS_REPORTER_PUBSUB_CHANNEL=megalinter:pubsub:results
# - REDIS_LINTER_REPORTER_PUBSUB_CHANNEL=megalinter:pubsub:linter_results
# - REDIS_ERRORS_REPORTER_PUBSUB_CHANNEL=megalinter:pubsub:error
depends_on:
- megalinter_server_redis
links:
- megalinter_server_redis
volumes:
- ./server-files:/tmp/server-files