Browse Source

refactor: cleanup docker compose and Makefile

master
Apostolos Fanakis 4 years ago
parent
commit
60d03cee1a
  1. 8
      Makefile
  2. 21
      docker-compose.yml

8
Makefile

@ -1,11 +1,11 @@
build: build:
@docker-compose -p janus build; @docker-compose build;
run: run:
@docker-compose -p janus up -d @docker-compose up -d
stop: stop:
@docker-compose -p janus down @docker-compose down
stop-clean-data: stop-clean-data:
@docker-compose -p janus down -v @docker-compose down -v
copy-jobs: copy-jobs:
@docker cp jenkins:/var/jenkins_home/jobs/. ./jenkins/jobs @docker cp jenkins:/var/jenkins_home/jobs/. ./jenkins/jobs
update-plugins: update-plugins:

21
docker-compose.yml

@ -16,8 +16,8 @@ services:
max-size: '4m' max-size: '4m'
max-file: '10' max-file: '10'
networks: networks:
- jenkins_net - janus_network
- concordia_net - concordia_network
ports: ports:
- "80:80" - "80:80"
- "443:443" - "443:443"
@ -43,8 +43,8 @@ services:
max-size: '4m' max-size: '4m'
max-file: '10' max-file: '10'
networks: networks:
- jenkins_net - janus_network
- concordia_net - concordia_network
volumes: volumes:
- ./volumes/nginx/conf:/etc/nginx/conf.d - ./volumes/nginx/conf:/etc/nginx/conf.d
- ./volumes/nginx/vhost:/etc/nginx/vhost.d - ./volumes/nginx/vhost:/etc/nginx/vhost.d
@ -60,18 +60,21 @@ services:
build: build:
dockerfile: ./Dockerfile dockerfile: ./Dockerfile
context: ./jenkins context: ./jenkins
container_name: jenkins image: ecentrics/janus
container_name: janus
restart: always restart: always
user: root user: root
env_file: env_file:
- ./env/jenkins.env - ./env/jenkins.env
ports:
- 8080:8080
secrets: secrets:
- jenkins_admin_username - jenkins_admin_username
- jenkins_admin_password - jenkins_admin_password
- jenkins_dockerhub_username - jenkins_dockerhub_username
- jenkins_dockerhub_password - jenkins_dockerhub_password
networks: networks:
- jenkins_net - janus_network
volumes: volumes:
- ./volumes/jenkins/log:/var/log/jenkins - ./volumes/jenkins/log:/var/log/jenkins
- jenkins-data:/var/jenkins_home - jenkins-data:/var/jenkins_home
@ -80,12 +83,12 @@ services:
- janus-common:/mnt/janus/common - janus-common:/mnt/janus/common
# Networks in use # Networks in use
# TODO: maybe add/split to separate networks
networks: networks:
jenkins_net: janus_network:
driver: bridge driver: bridge
concordia_net: concordia_network:
driver: bridge driver: bridge
# Secrets in use # Secrets in use
secrets: secrets:
jenkins_admin_username: jenkins_admin_username:

Loading…
Cancel
Save