-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yaml
64 lines (59 loc) · 1.96 KB
/
docker-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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
version: '3.7'
services:
jenkins:
build: jenkins
ports:
- "8080:8080"
depends_on:
- init
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./jenkins/jcasc:/var/jenkins_home/jcasc
- jenkins-workspace:/var/jenkins_home/workspace
- jenkins-jobs:/var/jenkins_home/jobs
deploy:
resources:
limits:
memory: 768M
privileged: true
secrets:
- source: ssh-github-java-meetup-key
- source: github-username
- source: github-password
- source: docker-hub-username
- source: docker-hub-password
- source: kubectl-encoded-config
smee:
image: deltaprojects/smee-client@sha256:acf90abd313cc7d11091bd5d6eb306142ffaedf17ba781bed039000bd313d294
command: smee-client -u https://smee.io/${SMEE_CHANNEL:-your-smee-channel-id} -t http://jenkins:8080/github-webhook/
init:
image: kroniak/ssh-client:3.9
command: |
/bin/bash -c "\
# make sure all mounted volumes are owned by the jenkins user
chown -R 1000:1000 /mnt/jenkins-volumes; \
# re-use the existing ./kube/config from the docker host
cat /mnt/kube-conf-dir/config | base64 > /var/.secrets/kubectl-encoded-config
# If no SSH keypair exist yet for pulling, create one for demo purposes
ssh-keygen -t ed25519 -f /var/.secrets/ssh-github-java-meetup-key || true"
volumes:
- .secrets:/var/.secrets
- ${HOME}/.kube:/mnt/kube-conf-dir
- jenkins-workspace:/mnt/jenkins-volumes/workspace
- jenkins-jobs:/mnt/jenkins-volumes/jobs
secrets:
ssh-github-java-meetup-key:
file: .secrets/ssh-github-java-meetup-key
github-username:
file: .secrets/github-username
github-password:
file: .secrets/github-password
docker-hub-username:
file: .secrets/docker-hub-username
docker-hub-password:
file: .secrets/docker-hub-password
kubectl-encoded-config:
file: .secrets/kubectl-encoded-config
volumes:
jenkins-workspace:
jenkins-jobs: