diff --git a/flatcar/app/app.service b/flatcar/app/app.service index 36345be..bbba8b2 100644 --- a/flatcar/app/app.service +++ b/flatcar/app/app.service @@ -4,8 +4,8 @@ After=docker.service Requires=docker.service [Service] TimeoutStartSec=0 -ExecStart=/usr/bin/docker compose -f /app/docker-compose.yaml up -ExecStop=/usr/bin/docker compose -f /app/docker-compose.yaml stop +ExecStart=/bin/bash -c '/usr/bin/docker compose -f /app/docker-compose.yaml $(find /app -mindepth 2 -maxdepth 2 -type f -name docker-compose.yaml -exec echo -f {} \;) up' +ExecStop=/bin/bash -c '/usr/bin/docker compose -f /app/docker-compose.yaml $(find /app -mindepth 2 -maxdepth 2 -type f -name docker-compose.yaml -exec echo -f {} \;) stop' Restart=always RestartSec=5s diff --git a/flatcar/app/docker-compose.yaml b/flatcar/app/docker-compose.yaml index cd7bee1..50903b1 100644 --- a/flatcar/app/docker-compose.yaml +++ b/flatcar/app/docker-compose.yaml @@ -26,40 +26,8 @@ services: restart: unless-stopped networks: - lb - wg-easy: - image: ghcr.io/wg-easy/wg-easy:15 - environment: - - PORT=80 - ports: - - "51820:51820/udp" - networks: - lb: - wg: - ipv4_address: 10.42.42.42 -# ipv6_address: fdcc:ad94:bacf:61a3::2a - volumes: - - etc_wireguard:/etc/wireguard - - /lib/modules:/lib/modules:ro - restart: unless-stopped - cap_add: - - NET_ADMIN - - SYS_MODULE - sysctls: - - net.ipv4.ip_forward=1 - - net.ipv4.conf.all.src_valid_mark=1 - - net.ipv6.conf.all.disable_ipv6=0 - - net.ipv6.conf.all.forwarding=1 - - net.ipv6.conf.default.forwarding=1 networks: lb: - wg: - driver: bridge - ipam: - driver: default - config: - - subnet: 10.42.42.0/24 - - subnet: fdcc:ad94:bacf:61a3::/64 volumes: config: data: - etc_wireguard: diff --git a/flatcar/app/wg-easy/docker-compose.yaml b/flatcar/app/wg-easy/docker-compose.yaml new file mode 100644 index 0000000..aa00d2b --- /dev/null +++ b/flatcar/app/wg-easy/docker-compose.yaml @@ -0,0 +1,37 @@ +version: '3' +services: + wg-easy: + image: ghcr.io/wg-easy/wg-easy:15 + environment: + - PORT=80 + ports: + - "51820:51820/udp" + networks: + lb: + wg: + ipv4_address: 10.42.42.42 +# ipv6_address: fdcc:ad94:bacf:61a3::2a + volumes: + - etc_wireguard:/etc/wireguard + - /lib/modules:/lib/modules:ro + restart: unless-stopped + cap_add: + - NET_ADMIN + - SYS_MODULE + sysctls: + - net.ipv4.ip_forward=1 + - net.ipv4.conf.all.src_valid_mark=1 + - net.ipv6.conf.all.disable_ipv6=0 + - net.ipv6.conf.all.forwarding=1 + - net.ipv6.conf.default.forwarding=1 +networks: + lb: + wg: + driver: bridge + ipam: + driver: default + config: + - subnet: 10.42.42.0/24 + - subnet: fdcc:ad94:bacf:61a3::/64 +volumes: + etc_wireguard: diff --git a/flatcar/cl.yaml b/flatcar/cl.yaml index 8ae8d5f..0689f64 100644 --- a/flatcar/cl.yaml +++ b/flatcar/cl.yaml @@ -43,12 +43,6 @@ storage: - path: /app local: app files: -# - path: /var/lb/caddy/Caddyfile -# contents: -# local: app/lb/Caddyfile -# - path: /var/thintz-com/caddy/Caddyfile -# contents: -# local: app/thintz-com/Caddyfile ### docker-compose sysext ### https://flatcar.github.io/sysext-bakery/docker_compose/ - path: /opt/extensions/docker-compose/docker-compose-2.34.0-x86-64.raw @@ -61,14 +55,6 @@ storage: - path: /etc/sysupdate.d/noop.conf contents: source: https://extensions.flatcar.org/extensions/noop.conf -# - path: /var/docker-compose.yaml -# mode: 0644 -# user: -# name: core -# group: -# name: core -# contents: -# local: app/docker-compose.yaml links: - target: /opt/extensions/docker-compose/docker-compose-2.34.0-x86-64.raw path: /etc/extensions/docker-compose.raw