services:
  transmission-openvpn:
    image: haugene/transmission-openvpn
    container_name: transmission-openvpn
    cap_add:
      - NET_ADMIN
    devices:
      - /dev/net/tun
    ports:
      - 9091:9091
    volumes:
      - ./data:/data
      - /etc/localtime:/etc/localtime:ro
      - ./openvpn:/etc/openvpn/custom
    environment:
      - OPENVPN_PROVIDER=CUSTOM
      - OPENVPN_CONFIG=ProtonVPN_FR-20.udp
      - OPENVPN_USERNAME=${OPENVPN_USERNAME}
      - OPENVPN_PASSWORD=${OPENVPN_PASSWORD}
    restart: unless-stopped

