Integrate Nextcloud and Traefik into Dockerbox
This commit is contained in:
parent
801fd357d6
commit
b80bc110c3
@ -6,5 +6,7 @@
|
|||||||
roles:
|
roles:
|
||||||
- base
|
- base
|
||||||
- docker
|
- docker
|
||||||
|
- traefik
|
||||||
|
- nextcloud
|
||||||
- jenkins
|
- jenkins
|
||||||
- prometheus
|
- prometheus
|
||||||
|
@ -1,18 +1,31 @@
|
|||||||
# base
|
# base
|
||||||
allow_reboot: false
|
allow_reboot: false
|
||||||
manage_network: false
|
manage_network: false
|
||||||
network_type: static
|
|
||||||
ip_inter: eth1
|
|
||||||
ip_addr: 192.168.1.2/24
|
|
||||||
ip_gateway: 192.168.1.1
|
|
||||||
|
|
||||||
# docker
|
# docker
|
||||||
docker_user: vagrant
|
docker_user: vagrant
|
||||||
|
|
||||||
|
# traefik
|
||||||
|
traefik_dashboard: true
|
||||||
|
traefik_domain: traefik.vm.krislamo.org
|
||||||
|
traefik_auth: admin:$apr1$T1l.BCFz$Jyg8msXYEAUi3LLH39I9d1 # admin:admin
|
||||||
|
|
||||||
|
# nextcloud
|
||||||
|
nextcloud_version: stable
|
||||||
|
nextcloud_admin: admin
|
||||||
|
nextcloud_pass: password
|
||||||
|
nextcloud_domain: cloud.vm.krislamo.org
|
||||||
|
|
||||||
|
nextcloud_dbversion: latest
|
||||||
|
nextcloud_dbpass: password
|
||||||
|
|
||||||
# jenkins
|
# jenkins
|
||||||
jenkins_version: 2.229
|
jenkins_version: lts
|
||||||
|
jenkins_domain: jenkins.vm.krislamo.org
|
||||||
|
|
||||||
# prometheus
|
# prometheus
|
||||||
prom_name: prometheus
|
prom_name: prometheus
|
||||||
prom_version: latest
|
prom_version: latest
|
||||||
|
prom_domain: prom.vm.krislamo.org
|
||||||
|
grafana_domain: grafana.vm.krislamo.org
|
||||||
prom_targets: "['127.0.0.1', '127.0.0.1:9100']"
|
prom_targets: "['127.0.0.1', '127.0.0.1:9100']"
|
||||||
|
0
roles/jenkins/defaults/main.yml
Normal file
0
roles/jenkins/defaults/main.yml
Normal file
@ -33,7 +33,13 @@
|
|||||||
state: started
|
state: started
|
||||||
restart_policy: always
|
restart_policy: always
|
||||||
ports:
|
ports:
|
||||||
- 8080:8080
|
|
||||||
- 50000:50000
|
- 50000:50000
|
||||||
volumes:
|
volumes: "/home/{{ docker_user }}/jenkins:/var/jenkins_home"
|
||||||
- /home/{{ docker_user }}/jenkins:/var/jenkins_home
|
networks_cli_compatible: true
|
||||||
|
networks:
|
||||||
|
- name: traefik
|
||||||
|
labels:
|
||||||
|
traefik.http.routers.jenkins.rule: "Host(`{{ jenkins_domain }}`)"
|
||||||
|
traefik.http.routers.jenkins.entrypoints: websecure
|
||||||
|
traefik.docker.network: traefik
|
||||||
|
traefik.enable: "true"
|
||||||
|
@ -18,6 +18,10 @@
|
|||||||
src: prometheus-config.yml
|
src: prometheus-config.yml
|
||||||
dest: /home/{{ docker_user }}/prometheus/prometheus.yml
|
dest: /home/{{ docker_user }}/prometheus/prometheus.yml
|
||||||
|
|
||||||
|
- name: Create Prometheus network
|
||||||
|
docker_network:
|
||||||
|
name: "{{ prom_name }}"
|
||||||
|
|
||||||
- name: Start Prometheus container
|
- name: Start Prometheus container
|
||||||
docker_container:
|
docker_container:
|
||||||
name: "{{ prom_name }}"
|
name: "{{ prom_name }}"
|
||||||
@ -26,12 +30,26 @@
|
|||||||
restart_policy: always
|
restart_policy: always
|
||||||
volumes:
|
volumes:
|
||||||
- /home/{{ docker_user }}/prometheus:/etc/prometheus
|
- /home/{{ docker_user }}/prometheus:/etc/prometheus
|
||||||
ports:
|
networks_cli_compatible: true
|
||||||
- "80:9090"
|
networks:
|
||||||
|
- name: "{{ prom_name }}"
|
||||||
|
- name: traefik
|
||||||
|
labels:
|
||||||
|
traefik.http.routers.prometheus.rule: "Host(`{{ prom_domain }}`)"
|
||||||
|
traefik.http.routers.prometheus.entrypoints: websecure
|
||||||
|
traefik.docker.network: traefik
|
||||||
|
traefik.enable: "true"
|
||||||
|
|
||||||
- name: Start Grafana container
|
- name: Start Grafana container
|
||||||
docker_container:
|
docker_container:
|
||||||
name: grafana
|
name: grafana
|
||||||
image: grafana/grafana:latest
|
image: grafana/grafana:latest
|
||||||
ports:
|
networks_cli_compatible: true
|
||||||
- "3000:3000"
|
networks:
|
||||||
|
- name: "{{ prom_name }}"
|
||||||
|
- name: traefik
|
||||||
|
labels:
|
||||||
|
traefik.http.routers.grafana.rule: "Host(`{{ grafana_domain }}`)"
|
||||||
|
traefik.http.routers.grafana.entrypoints: websecure
|
||||||
|
traefik.docker.network: traefik
|
||||||
|
traefik.enable: "true"
|
||||||
|
Loading…
Reference in New Issue
Block a user