forked from Place1/wg-access-server
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
28 lines (27 loc) · 960 Bytes
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
version: "3.0"
services:
wg-access-server:
# to build the docker image from the source
# build:
# dockerfile: Dockerfile
# context: .
image: place1/wg-access-server
container_name: wg-access-server
cap_add:
- NET_ADMIN
volumes:
- "wg-access-server-data:/data"
# - "./config.yaml:/config.yaml" # if you have a custom config file
environment:
- "WG_ADMIN_USERNAME=admin"
- "WG_ADMIN_PASSWORD=${WG_ADMIN_PASSWORD:?\n\nplease set the WG_ADMIN_PASSWORD environment variable:\n export WG_ADMIN_PASSWORD=example\n}"
- "WG_WIREGUARD_PRIVATE_KEY=${WG_WIREGUARD_PRIVATE_KEY:?\n\nplease set the WG_WIREGUARD_PRIVATE_KEY environment variable:\n export WG_WIREGUARD_PRIVATE_KEY=$(wg genkey)\n}"
ports:
- "8000:8000/tcp"
- "51820:51820/udp"
devices:
- "/dev/net/tun:/dev/net/tun"
# shared volumes with the host
volumes:
wg-access-server-data:
driver: local