Integrate Nextcloud and Traefik into Dockerbox

This commit is contained in:
Kris Lamoureux 2020-07-18 01:58:57 -04:00
parent 801fd357d6
commit b80bc110c3
Signed by: kris
GPG Key ID: 3EDA9C3441EDA925
5 changed files with 51 additions and 12 deletions

View File

@ -6,5 +6,7 @@
roles:
- base
- docker
- traefik
- nextcloud
- jenkins
- prometheus

View File

@ -1,18 +1,31 @@
# base
allow_reboot: 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_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_version: 2.229
jenkins_version: lts
jenkins_domain: jenkins.vm.krislamo.org
# prometheus
prom_name: prometheus
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']"

View File

View File

@ -33,7 +33,13 @@
state: started
restart_policy: always
ports:
- 8080:8080
- 50000:50000
volumes:
- /home/{{ docker_user }}/jenkins:/var/jenkins_home
volumes: "/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"

View File

@ -18,6 +18,10 @@
src: prometheus-config.yml
dest: /home/{{ docker_user }}/prometheus/prometheus.yml
- name: Create Prometheus network
docker_network:
name: "{{ prom_name }}"
- name: Start Prometheus container
docker_container:
name: "{{ prom_name }}"
@ -26,12 +30,26 @@
restart_policy: always
volumes:
- /home/{{ docker_user }}/prometheus:/etc/prometheus
ports:
- "80:9090"
networks_cli_compatible: true
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
docker_container:
name: grafana
image: grafana/grafana:latest
ports:
- "3000:3000"
networks_cli_compatible: true
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"