NoPaste

DOCKER COMPOSE SERVER B

von hawkeye78

SNIPPET_TEXT:
  1. version: '3'
  2. services:
  3.   webclient:
  4.     image: wbitt/network-multitool
  5.     command: bash -c "while true; do echo hello; sleep 2; done"
  6.     network_mode: service:wireguard
  7. #    networks:
  8. #      - webserver-net
  9.  wireguard:
  10.     image: linuxserver/wireguard
  11.     container_name: wireguard
  12.     restart: unless-stopped
  13.     environment:
  14.       - PUID=1000
  15.       - PGID=1000
  16.       - TZ=Europe/Berlin
  17.     cap_add:
  18.       - NET_ADMIN
  19.       - SYS_MODULE
  20.     sysctls:
  21.       - net.ipv4.ip_forward=1
  22.       - net.ipv4.conf.all.src_valid_mark=1
  23.     volumes:
  24.       - /home/dan/wireguard:/config
  25.       - /lib/modules:/lib/modules:ro
  26.     ports:
  27.       - 51820:51820
  28.     networks:
  29.       - webserver-net
  30. networks:
  31.   webserver-net:
  32.     driver: bridge
  33.     external: true
  34.     name: webserver-net

Quellcode

Hier kannst du den Code kopieren und ihn in deinen bevorzugten Editor einfügen. PASTEBIN_DOWNLOAD_SNIPPET_EXPLAIN