forked from dachiefjustice/railsgoat-cicd-lab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yaml
49 lines (49 loc) · 1.4 KB
/
compose.yaml
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
volumes:
zap-reports:
services:
railsgoat-web:
build:
context: ../../railsgoat
command: >
bash -c "rm -f tmp/pids/server.pid &&
rails db:setup &&
bundle exec rails s -p 3000 -b '0.0.0.0'"
volumes:
- ../../railsgoat:/myapp
ports:
- "3000:3000"
environment:
- COMPOSE_SERVICE_NAME=railsgoat-web # https://danielabaron.me/blog/rails-blocked-host-docker-fix/
zap-scan-initializer: # solve docker compose volume perms issue: https://github.com/zaproxy/zaproxy/issues/6993
image: alpine
volumes:
- zap-reports:/zap-reports
command: /bin/sh -c "chown 1000:1000 /zap-reports"
zap-scan-automation-framework:
image: ghcr.io/zaproxy/zaproxy:stable
command: "zap.sh
-cmd
-addonupdate
-autorun /zap/zap-railsgoat.yml"
volumes:
- zap-reports:/zap/wrk/:rw
- ./zap-railsgoat.yml:/zap/zap-railsgoat.yml:ro
depends_on:
- railsgoat-web
- zap-scan-initializer
deploy:
resources:
limits:
cpus: '1.0'
memory: 3500M
reservations:
cpus: '0.25'
memory: 500M
zap-process-report:
build: ./process-report
volumes:
- zap-reports:/zap-reports
- ../..:/workspace
command: >
sh -c "mkdir -p /workspace/zap-reports &&
cp -r /zap-reports/* /workspace/zap-reports"