This commit is contained in:
2023-11-12 21:08:40 +01:00
parent 35361172e1
commit de065be791
2 changed files with 81 additions and 67 deletions

View File

@@ -73,76 +73,75 @@
- docker-compose - docker-compose
- bootstrap_dockerapp_configure_docker_compose - bootstrap_dockerapp_configure_docker_compose
# - name: Run `docker-compose pull`
# community.docker.docker_compose:
# project_src: "{{ dockerapp_tree_base_dir | last }}/{{ dockerapp_service }}/docker-compose.yml"
# pull: true
# tags:
# - pull
- name: Run `docker-compose pull` # - name: Run `docker-compose up`
community.docker.docker_compose: # community.docker.docker_compose:
project_src: "{{ dockerapp_tree_base_dir | last }}/{{ dockerapp_service }}/docker-compose.yml" # project_src: "{{ dockerapp_tree_base_dir | last }}/{{ dockerapp_service }}/docker-compose.yml"
pull: true # build: false
tags: # tags:
- pull # - pull
- name: Run `docker-compose up` # - name: uncomment acme.caserver line
community.docker.docker_compose: # ansible.builtin.lineinfile:
project_src: "{{ dockerapp_tree_base_dir | last }}/{{ dockerapp_service }}/docker-compose.yml" # path: /etc/sudoers
build: false # state: absent
tags: # regexp: '^%wheel'
- pull # tags:
# - renew-httos
- name: uncomment acme.caserver line # - name: remove appdata/traefik2/acme/letsencrypt/acme.json file
ansible.builtin.lineinfile: # file:
path: /etc/sudoers # path: "{{ dockerapp_tree_base_dir | last }}/{{ dockerapp_service }}/appdata/traefik2/acme/letsencrypt/acme.json"
state: absent # state: absent
regexp: '^%wheel' # tags:
tags: # - renew-https
- renew-httos
- name: remove appdata/traefik2/acme/letsencrypt/acme.json file # - name: Run `docker-compose down`
file: # community.docker.docker_compose:
path: "{{ dockerapp_tree_base_dir | last }}/{{ dockerapp_service }}/appdata/traefik2/acme/letsencrypt/acme.json" # project_src: "{{ dockerapp_tree_base_dir | last }}/{{ dockerapp_service }}/docker-compose.yml"
state: absent # state: absent
tags: # tags:
- renew-https # - renew-https
- name: Run `docker-compose down` # - name: Run `docker-compose up`
community.docker.docker_compose: # community.docker.docker_compose:
project_src: "{{ dockerapp_tree_base_dir | last }}/{{ dockerapp_service }}/docker-compose.yml" # project_src: "{{ dockerapp_tree_base_dir | last }}/{{ dockerapp_service }}/docker-compose.yml"
state: absent # build: false
tags: # tags:
- renew-https # - renew-https
- name: Run `docker-compose up` # - name: Wait 5 minutes for news cert/key on acme.json (stagging)
community.docker.docker_compose: # pause:
project_src: "{{ dockerapp_tree_base_dir | last }}/{{ dockerapp_service }}/docker-compose.yml" # seconds: 300
build: false # tags:
tags: # - renew-https
- renew-https
- name: Wait 5 minutes for news cert/key on acme.json (stagging) # - name: comment acme.caserver line
pause: # ansible.builtin.lineinfile:
seconds: 300 # path: /etc/sudoers
tags: # state: absent
- renew-https # regexp: '^%wheel'
# tags:
# - renew-https
- name: comment acme.caserver line # - name: remove appdata/traefik2/acme/letsencrypt/acme.json file
ansible.builtin.lineinfile: # file:
path: /etc/sudoers # path: "{{ dockerapp_tree_base_dir | last }}/{{ dockerapp_service }}/appdata/traefik2/acme/letsencrypt/acme.json"
state: absent # state: absent
regexp: '^%wheel' # tags:
tags: # - renew-https
- renew-https
- name: remove appdata/traefik2/acme/letsencrypt/acme.json file # - name: Run `docker-compose restart traefik`
file: # community.docker.docker_compose:
path: "{{ dockerapp_tree_base_dir | last }}/{{ dockerapp_service }}/appdata/traefik2/acme/letsencrypt/acme.json" # project_src: "{{ dockerapp_tree_base_dir | last }}/{{ dockerapp_service }}/docker-compose.yml"
state: absent # restarted: true
tags: # services:
- renew-https # - traefik
# tags:
- name: Run `docker-compose restart traefik` # - renew-https
community.docker.docker_compose:
project_src: "{{ dockerapp_tree_base_dir | last }}/{{ dockerapp_service }}/docker-compose.yml"
restarted: true
services:
- traefik
tags:
- renew-https

View File

@@ -152,8 +152,7 @@ logrotate_scripts:
# - postrotate: docker-compose restart grafana # - postrotate: docker-compose restart grafana
- name: dockerapps-backup - name: dockerapps-backup
paths: paths:
- /opt/dockerapps/backup/gitea-dump-*.zip - /opt/dockerapps/backup/gitea-dump-*.zip.1.gz
- /opt/dockerapps/vaultwarden/backup/*.gpg
- /opt/dockerapps/vaultwarden/backup/*gpg.1.gz - /opt/dockerapps/vaultwarden/backup/*gpg.1.gz
options: options:
- rotate 6 - rotate 6
@@ -215,30 +214,47 @@ dockerapp_tree_volumes:
- ara - ara
#BLACKBOX #BLACKBOX
- blackbox - blackbox
- blackbox/config
#GIT #GIT
- gitea - gitea
- gitea/gitea
- gitea/db
#GRAF #GRAF
- grafana - grafana
- grafana/etc
- grafana/lib
#HOMARR #HOMARR
- homarr - homarr
- homarr/configs
- homarr/icons
#HOME #HOME
- homepage - homepage
- homepage/homepage
- homepage/icons
#MEALIE #MEALIE
- mealie - mealie
#PORT #PORT
- portainer - portainer
#PROM #PROM
- prometheus - prometheus
- prometheus/prometheus
- prometheus/prometheus_data
#REGISTRY #REGISTRY
- registry - registry
- registry/data
#SEMA #SEMA
- semaphore - semaphore
#TRAF #TRAF
- traefik2 - traefik2
- traefik2/acme
- traefik2/rules
#VAULT #VAULT
- vaultwarden - vaultwarden
#WIRE #WIRE
- wireguard - wireguard
- wireguard/config
- wireguard/lib
- wireguard/lib/modules
dockerapp_tree_base_dir: dockerapp_tree_base_dir:
- "/opt/" - "/opt/"
@@ -248,7 +264,6 @@ pip_executable: pip3
pip_install_packages: pip_install_packages:
- docker-compose - docker-compose
dockerapp_compose: dockerapp_compose:
version: "3.9" version: "3.9"
######### IMPORTANT ############# ######### IMPORTANT #############