-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
44 lines (40 loc) · 1.24 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
version: '3.9'
services:
jenkins:
image: jenkins/jenkins
container_name: jenkins-server
privileged: true
hostname: jenkinsserver
user: root
labels:
com.example.description: "Jenkins-Server by DigitalAvenue.dev"
ports:
- "8080:8080"
- "50000:50000"
- "4200:4200"
- "3000:3000"
networks:
jenkins-net:
aliases:
- jenkins-net
volumes:
- jenkins-data:/var/jenkins_home
- /var/run/docker.sock:/var/run/docker.sock
# One of the benefits of docker-compose is the ability to easily spin up multiple apps like a test email server alongside Jenkins
# for testing email notifications from jenkins (later). And this will happen over
# the specicified virtual network created by docker-compose i.e. jenkins-net in this case
mails:
image: mailhog/mailhog
container_name: mails-server
restart: unless-stopped
ports:
- "8025:8025" # mailhog's web app (think test instance of gmail)
# - "1025:1025" jenkins will us mail:1025 to send emails; only map to host if we need to send files as part of the email notifications
networks:
jenkins-net:
aliases:
- jenkins-net
volumes:
jenkins-data:
networks:
jenkins-net: