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:
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:

View file

@ -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"

View file

@ -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:

View file

@ -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:

View file

@ -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

View file

@ -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 -%}

View file

@ -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