diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..676cff1 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,32 @@ +services: + edgevpn: + image: quay.io/mudler/edgevpn:latest + pull_policy: always + container_name: edgevpn + restart: unless-stopped + volumes: + - /home/CHANGEME/.edgevpn:/root/.edgevpn + + # If you want to specify arguments on startup you can either use the `entrypoint` below or specify environment variables + # entrypoint: /usr/bin/edgevpn --address 10.5.0.10/24 --api --api-listen 127.0.0.1:57777 --low-profile --privkey-cache --privkey-cache-dir=/root/.edgevpn + environment: + - EDGEVPNTOKEN=CHANGEME + + # This is needed to allow edgevpn to setup the `edgevpn0` network interface systemwide: + network_mode: host + devices: + - /dev/net/tun:/dev/net/tun + cap_add: + - NET_ADMIN + + # basic healthcheck that checks wether "edgevpn0" is indeed present as a network interface + healthcheck: + test: ["CMD", "sh", "-c", "ifconfig | grep -q edgevpn0"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 40s + + # logging: + # driver: journald + diff --git a/docs/content/en/docs/Getting started/_index.md b/docs/content/en/docs/Getting started/_index.md index 60fa80f..d36cbf4 100644 --- a/docs/content/en/docs/Getting started/_index.md +++ b/docs/content/en/docs/Getting started/_index.md @@ -36,7 +36,18 @@ $> cd edgevpn $> go build ``` -### First VPN +### Using Docker Compose + +Using docker is still experimental as setups can vary wildly. +An example [docker-compose.yml](https://github.com/mudler/edgevpn/blob/master/docker-compose.yml) file is provided for convenience but you'll likely need to edit it. + +```bash +$> git clone https://github.com/mudler/edgevpn +$> cd edgevpn +$> sudo docker compose up --detach +``` + +## Creating Your First VPN Let's create our first vpn now and start it: