Remove hardly used compose shortscuts

This commit is contained in:
Tobias Reisinger 2023-12-11 14:49:43 +01:00
parent 1d074bf14b
commit 5f9747c378
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
7 changed files with 21 additions and 40 deletions

View file

@ -15,27 +15,12 @@ compose_file_main:
apps: apps:
external: true external: true
compose_file_depends_on:
services:
app:
depends_on: "{{ compose.depends_on }}"
compose_file_env: compose_file_env:
services: services:
app: app:
env_file: env_file:
- service.env - service.env
compose_file_user:
services:
app:
user: "{{ compose.user }}"
compose_file_ports:
services:
app:
ports: "{{ compose.ports }}"
compose_file_volumes: compose_file_volumes:
services: services:
app: app:

View file

@ -16,8 +16,11 @@ svc:
compose: compose:
watchtower: true watchtower: true
image: joohoi/acme-dns image: joohoi/acme-dns
volumes:
- ./config:/etc/acme-dns:ro
file:
services:
app:
ports: ports:
- "53:53" - "53:53"
- "53:53/udp" - "53:53/udp"
volumes:
- ./config:/etc/acme-dns:ro

View file

@ -85,10 +85,12 @@ compose:
- data:/data - data:/data
- /etc/timezone:/etc/timezone:ro - /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro - /etc/localtime:/etc/localtime:ro
file:
services:
app:
ports: ports:
- "{{ svc.ssh_port }}:{{ svc.ssh_port }}" - "{{ svc.ssh_port }}:{{ svc.ssh_port }}"
- "{{ svc.ssh_port_alt }}:{{ svc.ssh_port }}" - "{{ svc.ssh_port_alt }}:{{ svc.ssh_port }}"
file:
volumes: volumes:
data: data:

View file

@ -12,13 +12,15 @@ svc_env:
compose: compose:
watchtower: true watchtower: true
image: jellyfin/jellyfin image: jellyfin/jellyfin
user: 8096:8096
env: true env: true
volumes: volumes:
- config:/config - config:/config
- cache:/cache - cache:/cache
- media:/media - media:/media
file: file:
services:
app:
user: 8096:8096
volumes: volumes:
config: config:
cache: cache:

View file

@ -21,13 +21,14 @@ svc_env:
compose: compose:
watchtower: false watchtower: false
image: cthulhoo/ttrss-web-nginx image: cthulhoo/ttrss-web-nginx
depends_on:
- tt-rss
env: true env: true
volumes: volumes:
- app:/var/www/html:ro - app:/var/www/html:ro
- ./nginx.conf:/etc/nginx/nginx.conf - ./nginx.conf:/etc/nginx/nginx.conf
file: file:
app:
depends_on:
- tt-rss
services: services:
tt-rss: tt-rss:
image: cthulhoo/ttrss-fpm-pgsql-static image: cthulhoo/ttrss-fpm-pgsql-static

View file

@ -1,22 +1,10 @@
{%- set compose_file = compose.file | default({}) -%} {%- set compose_file = compose.file | default({}) -%}
{%- set compose_file = compose_file_main | combine(compose_file, recursive=True) -%} {%- 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) -%} {%- if compose.env | default(False) -%}
{%- set compose_file = compose_file | combine(compose_file_env, recursive=True) -%} {%- set compose_file = compose_file | combine(compose_file_env, recursive=True) -%}
{%- endif -%} {%- 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) -%} {%- if compose.volumes | default(False) -%}
{%- set compose_file = compose_file | combine(compose_file_volumes, recursive=True) -%} {%- set compose_file = compose_file | combine(compose_file_volumes, recursive=True) -%}
{%- endif -%} {%- endif -%}

View file

@ -11,7 +11,7 @@ services:
depends_on: depends_on:
- redis - redis
networks: networks:
local-net: default:
apps: apps:
aliases: aliases:
- authentik - authentik
@ -29,15 +29,15 @@ services:
depends_on: depends_on:
- redis - redis
networks: networks:
local-net: default:
redis: redis:
image: redis:alpine image: redis:alpine
restart: unless-stopped restart: unless-stopped
networks: networks:
local-net: default:
networks: networks:
local-net: default:
apps: apps:
external: true external: true