forked from mjstealey/jenkins-nginx-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
42 lines (40 loc) · 983 Bytes
/
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
version: '3.1'
services:
nginx:
image: nginx:latest
container_name: nginx
ports:
- '80:80'
- '443:443'
volumes:
- /home/jenkins/nginx/etc/nginx/conf.d:/etc/nginx/conf.d
- /home/jenkins/nginx/etc/ssl/certs:/etc/ssl/certs
- /home/jenkins/nginx/var/log/nginx:/var/log/nginx
networks:
- jenkins_network
links:
- jenkins
restart: always
jenkins:
image: jenkins.nginx.docker:lts
build:
context: ./
dockerfile: Dockerfile
container_name: jenkins
ports:
- '2022:22'
- '50000:50000'
- '50022:50022'
volumes:
- /home/jenkins/jenkins/var/jenkins/home:/var/jenkins_home
- /home/jenkins/jenkins/etc/hosts.d:/etc/hosts.d
- /var/run/docker.sock:/var/run/docker.sock
networks:
- jenkins_network
environment:
- UID_JENKINS=1003
- GID_JENKINS=1003
- JENKINS_OPTS="--prefix=/"
restart: always
networks:
jenkins_network: