diff --git a/_ansible/inventory/group_vars/all/compose_defaults.yml b/_ansible/inventory/group_vars/all/compose_defaults.yml index fd3311a..5af6c7a 100644 --- a/_ansible/inventory/group_vars/all/compose_defaults.yml +++ b/_ansible/inventory/group_vars/all/compose_defaults.yml @@ -15,27 +15,12 @@ compose_file_main: apps: external: true -compose_file_depends_on: - services: - app: - depends_on: "{{ compose.depends_on }}" - compose_file_env: services: app: env_file: - service.env -compose_file_user: - services: - app: - user: "{{ compose.user }}" - -compose_file_ports: - services: - app: - ports: "{{ compose.ports }}" - compose_file_volumes: services: app: diff --git a/_ansible/roles/acme-dns/vars/main.yml b/_ansible/roles/acme-dns/vars/main.yml index 3e867fa..4c2cc7b 100644 --- a/_ansible/roles/acme-dns/vars/main.yml +++ b/_ansible/roles/acme-dns/vars/main.yml @@ -16,8 +16,11 @@ svc: compose: watchtower: true image: joohoi/acme-dns - ports: - - "53:53" - - "53:53/udp" volumes: - ./config:/etc/acme-dns:ro + file: + services: + app: + ports: + - "53:53" + - "53:53/udp" diff --git a/_ansible/roles/forgejo/vars/main.yml b/_ansible/roles/forgejo/vars/main.yml index f1e51b2..fc4ed3d 100644 --- a/_ansible/roles/forgejo/vars/main.yml +++ b/_ansible/roles/forgejo/vars/main.yml @@ -85,10 +85,12 @@ compose: - data:/data - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro - ports: - - "{{ svc.ssh_port }}:{{ svc.ssh_port }}" - - "{{ svc.ssh_port_alt }}:{{ svc.ssh_port }}" file: + services: + app: + ports: + - "{{ svc.ssh_port }}:{{ svc.ssh_port }}" + - "{{ svc.ssh_port_alt }}:{{ svc.ssh_port }}" volumes: data: diff --git a/_ansible/roles/jellyfin/vars/main.yml b/_ansible/roles/jellyfin/vars/main.yml index 85e29c3..e33974b 100644 --- a/_ansible/roles/jellyfin/vars/main.yml +++ b/_ansible/roles/jellyfin/vars/main.yml @@ -12,13 +12,15 @@ svc_env: compose: watchtower: true image: jellyfin/jellyfin - user: 8096:8096 env: true volumes: - config:/config - cache:/cache - media:/media file: + services: + app: + user: 8096:8096 volumes: config: cache: diff --git a/_ansible/roles/tinytinyrss/vars/main.yml b/_ansible/roles/tinytinyrss/vars/main.yml index 05b053e..55f8a22 100644 --- a/_ansible/roles/tinytinyrss/vars/main.yml +++ b/_ansible/roles/tinytinyrss/vars/main.yml @@ -21,13 +21,14 @@ svc_env: compose: watchtower: false image: cthulhoo/ttrss-web-nginx - depends_on: - - tt-rss env: true volumes: - app:/var/www/html:ro - ./nginx.conf:/etc/nginx/nginx.conf file: + app: + depends_on: + - tt-rss services: tt-rss: image: cthulhoo/ttrss-fpm-pgsql-static diff --git a/_ansible/templates/docker-compose.yml.j2 b/_ansible/templates/docker-compose.yml.j2 index b5dbe5b..5a5f260 100644 --- a/_ansible/templates/docker-compose.yml.j2 +++ b/_ansible/templates/docker-compose.yml.j2 @@ -1,22 +1,10 @@ {%- set compose_file = compose.file | default({}) -%} {%- set compose_file = compose_file_main | combine(compose_file, recursive=True) -%} -{%- if compose.depends_on | default(False) -%} - {%- set compose_file = compose_file | combine(compose_file_depends_on, recursive=True) -%} -{%- endif -%} - {%- if compose.env | default(False) -%} {%- set compose_file = compose_file | combine(compose_file_env, recursive=True) -%} {%- endif -%} -{%- if compose.ports | default(False) -%} - {%- set compose_file = compose_file | combine(compose_file_ports, recursive=True) -%} -{%- endif -%} - -{%- if compose.user | default(False) -%} - {%- set compose_file = compose_file | combine(compose_file_user, recursive=True) -%} -{%- endif -%} - {%- if compose.volumes | default(False) -%} {%- set compose_file = compose_file | combine(compose_file_volumes, recursive=True) -%} {%- endif -%} diff --git a/authentik/docker-compose.yml b/authentik/docker-compose.yml index e5739ec..1f731cc 100644 --- a/authentik/docker-compose.yml +++ b/authentik/docker-compose.yml @@ -11,7 +11,7 @@ services: depends_on: - redis networks: - local-net: + default: apps: aliases: - authentik @@ -29,15 +29,15 @@ services: depends_on: - redis networks: - local-net: + default: redis: image: redis:alpine restart: unless-stopped networks: - local-net: + default: networks: - local-net: + default: apps: external: true