-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
96 lines (89 loc) · 2.1 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
version: "3.9"
services:
webapp:
build: ./app
image: webapp
container_name: webapp
networks:
- app-test
ports:
- "5000:5000"
deploy:
restart_policy:
condition: always
delay: 3s
webtest:
build: ./app/tests
image: webtest
container_name: webtest
networks:
- app-test
depends_on:
- webapp
deploy:
restart_policy:
condition: always
delay: 3s
cicd:
build: ./jenkins
image: cicd
container_name: cicd
ports:
- "8080:8080"
environment:
- DOCKER_HOST=tcp://docker:2376
- DOCKER_CERT_PATH=/certs/client
- DOCKER_TLS_VERIFY=1
volumes:
- jenkins-docker-certs:/certs/client:ro
- jenkins-data:/var/jenkins_home
networks:
- cicd
depends_on:
- docker
- sast
deploy:
restart_policy:
condition: always
delay: 3s
sast:
image: sonarqube:latest
container_name: sast
ports:
- "9000:9000"
volumes:
- sonarqube-data:/opt/sonarqube:rw
networks:
- cicd
deploy:
restart_policy:
condition: always
delay: 3s
docker:
image: docker:dind
container_name: dind
privileged: true
ports:
- "80:5000"
environment:
- DOCKER_TLS_CERTDIR=/certs
volumes:
- jenkins-docker-certs:/certs/client
- jenkins-data:/var/jenkins_home
- docker-data:/var/lib/docker
networks:
- cicd
deploy:
restart_policy:
condition: always
delay: 3s
volumes:
jenkins-docker-certs:
jenkins-data:
docker-data:
sonarqube-data:
networks:
app-test:
name: app-test-local
cicd:
name: cicd-local