-
Notifications
You must be signed in to change notification settings - Fork 59
/
docker-compose.yml
43 lines (40 loc) · 1.09 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
version: "3.9"
services:
jenkins:
# default ports 8080, 50000 - expose mapping as needed to host
build:
context: ./jenkins
dockerfile: Dockerfile
container_name: cicd-jenkins
restart: unless-stopped
networks:
- jenkins
ports:
- "50000:50000"
environment:
# Uncomment JENKINS_OPTS to add prefix: e.g. https://127.0.0.1:8443/jenkins
#- JENKINS_OPTS="--prefix=/jenkins"
- JENKINS_UID=${JENKINS_UID}
- JENKINS_GID=${JENKINS_GID}
volumes:
- ${JENKINS_LOCAL_HOME}:/var/jenkins_home
- ${HOST_DOCKER_SOCK}:/var/run/docker.sock
nginx:
# default ports 80, 443 - expose mapping as needed to host
image: nginx:1
container_name: cicd-nginx
restart: unless-stopped
networks:
- jenkins
ports:
- "8080:80" # http
- "8443:443" # https
volumes:
- ${JENKINS_LOCAL_HOME}:/var/jenkins_home
- ${NGINX_CONF}:/etc/nginx/conf.d/default.conf
- ${NGINX_SSL_CERTS}:/etc/ssl
- ${NGINX_LOGS}:/var/log/nginx
networks:
jenkins:
name: cicd-jenkins
driver: bridge