mirror of
https://github.com/mudler/edgevpn.git
synced 2025-09-26 12:51:21 +08:00
feat: add docker compose example (#911)
* feat: add docker compose example Signed-off-by: thiswillbeyourgithub <26625900+thiswillbeyourgithub@users.noreply.github.com> * new: add basic healthcheck to the docker compose example Signed-off-by: thiswillbeyourgithub <26625900+thiswillbeyourgithub@users.noreply.github.com> --------- Signed-off-by: thiswillbeyourgithub <26625900+thiswillbeyourgithub@users.noreply.github.com>
This commit is contained in:
32
docker-compose.yml
Normal file
32
docker-compose.yml
Normal file
@@ -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
|
||||
|
@@ -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:
|
||||
|
||||
|
Reference in New Issue
Block a user