version: "3.8"
services:
  wgrplane:
    build:
      context: .
      dockerfile: Dockerfile
    ports:
      - "10087:10087"
    volumes:
      - ./wgrplane-data:/var/lib/wgrplane
      - ./wireguard-config:/etc/wireguard
    depends_on:
      - wireguard
    restart: unless-stopped

  wireguard:
    image: ghcr.io/linuxserver/wireguard:latest
    container_name: wireguard
    cap_add:
      - NET_ADMIN
      - SYS_MODULE
    network_mode: "host"
    volumes:
      - /etc/wireguard:/config
      - /lib/modules:/lib/modules
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=UTC
    restart: unless-stopped
