You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
960 B
YAML
29 lines
960 B
YAML
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
|