# Configuration for wg-easy v15 setup

# Name of the big-bear-wg-easy-v15 application
name: big-bear-wg-easy-v15
# Service definitions for the big-bear-wg-easy-v15 application
services:
  # Service name: big-bear-wg-easy-v15
  # The `big-bear-wg-easy-v15` service definition
  big-bear-wg-easy-v15:
    # Name of the container
    container_name: big-bear-wg-easy-v15
    # Image to be used for the container
    image: ghcr.io/wg-easy/wg-easy:15
    # Container restart policy
    restart: unless-stopped
    # Environment variables for the container
    # v15 uses INIT_* variables for unattended setup (only used on first start)
    environment:
      INIT_ENABLED: "true"
      INIT_USERNAME: "bigbear"
      INIT_PASSWORD: "changeme"
      INIT_HOST: "[YOUR_PUBLIC_IP]"
      INIT_PORT: "51820"
      INIT_DNS: "1.1.1.1,8.8.8.8"
      INIT_IPV4_CIDR: "10.8.0.0/24"
      INIT_IPV6_CIDR: "fd42:42:42::/64"
    # capabilities to be added to the container
    cap_add:
      - NET_ADMIN
      - SYS_MODULE
    # sysctls to be added to the container
    sysctls:
      - net.ipv4.conf.all.src_valid_mark=1
      - net.ipv4.ip_forward=1
      - net.ipv6.conf.all.disable_ipv6=0
      - net.ipv6.conf.all.forwarding=1
      - net.ipv6.conf.default.forwarding=1
    # Volumes to be mounted to the container
    volumes:
      # Mounting the local wg-easy-v15_data directory to /etc/wireguard inside the container
      - /DATA/AppData/$AppID/data:/etc/wireguard
    # Ports mapping between host and container
    ports:
      - 51820:51820/udp
      - 51821:51821/tcp # UI port
    x-casaos:
      envs:
        - container: INIT_ENABLED
          description:
            en_us: 'Container Variable: INIT_ENABLED'
        - container: INIT_USERNAME
          description:
            en_us: 'Container Variable: INIT_USERNAME'
        - container: INIT_PASSWORD
          description:
            en_us: 'Container Variable: INIT_PASSWORD'
        - container: INIT_HOST
          description:
            en_us: 'Container Variable: INIT_HOST'
        - container: INIT_PORT
          description:
            en_us: 'Container Variable: INIT_PORT'
        - container: INIT_DNS
          description:
            en_us: 'Container Variable: INIT_DNS'
        - container: INIT_IPV4_CIDR
          description:
            en_us: 'Container Variable: INIT_IPV4_CIDR'
        - container: INIT_IPV6_CIDR
          description:
            en_us: 'Container Variable: INIT_IPV6_CIDR'
      volumes:
        - container: /etc/wireguard
          description:
            en_us: 'Container Path: /etc/wireguard'
      ports:
        - container: "51820"
          description:
            en_us: 'Container Port: 51820'
        - container: "51821"
          description:
            en_us: 'Container Port: 51821'
x-casaos:
  # Supported CPU architectures for this application
  architectures:
    - amd64
    - arm64
  # Main service for this application
  main: big-bear-wg-easy-v15
  # Detailed description for the application
  description:
    en_us: 'WireGuard Easy v15 - Complete rewrite with new features and improved UI. Access your homeserver from anywhere with this modern VPN solution. NOTE: This is v15 which has breaking changes from v14. If you''re currently using v14, please backup your configuration before migrating.'
  # Brief tagline for the application
  tagline:
    en_us: WireGuard VPN server v15 (New Version)
  # Developer's information
  developer: WeeJeWel
  # Author of this particular configuration
  author: BigBearTechWorld
  # Icon URL for the application
  icon: https://cdn.jsdelivr.net/gh/bigbeartechworld/big-bear-universal-apps/apps/wg-easy-v15/logo.png
  # Thumbnail image for the application (if any)
  thumbnail: ""
  # Installation tips
  tips:
    before_install:
      en_us: 'Read this before installing: https://community.bigbeartechworld.com/t/added-wg-easy-v15-to-bigbearcasaos/5071#p-7701-why-a-new-version-4'
  # Title for the application
  title:
    en_us: WireGuard Easy v15
  # Category under which the application falls
  category: BigBearCasaOS
  # Default port mapping for the application
  port_map: "51821"
