You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.6 KiB

  1. version: '3.6'
  2. services:
  3. wg-gen-web:
  4. image: vx3r/wg-gen-web:latest
  5. container_name: wg-gen-web
  6. restart: unless-stopped
  7. expose:
  8. - "8080"
  9. environment:
  10. - WG_CONF_DIR=/data
  11. - WG_INTERFACE_NAME=wg0.conf
  12. - WG_STATS_API=http://172.20.1.1:8182
  13. - WG_STATS_API_USER=
  14. - WG_STATS_API_PASS=
  15. - SMTP_HOST=
  16. - SMTP_PORT=
  17. - SMTP_USERNAME=
  18. - SMTP_PASSWORD=
  19. - SMTP_FROM=
  20. volumes:
  21. - /etc/wireguard:/data
  22. labels:
  23. - "traefik.enable=true"
  24. - "traefik.http.routers.wg-gen-web.rule=Host(`vpn.admr-jura.org`)"
  25. - "traefik.http.routers.wg-gen-web.entrypoints=web"
  26. - "traefik.http.routers.wg-gen-web.service=wg-gen-web"
  27. - "traefik.http.services.wg-gen-web.loadbalancer.server.port=8080"
  28. - "traefik.docker.network=traefik"
  29. # Add authentication here in the form : <user>:<brcypt2 hash>,<user2>:<bcrypt2 hash>
  30. # https://www.bcrypt.fr/ to generate hashes. Don't forget to double '$' caracters !
  31. # - "traefik.http.routers.wg-gen-web.middlewares=wg-gen-web"
  32. # - "traefik.http.middlewares.wg-gen-web.basicauth.users=test:$$apr1$$H6uskkkW$$IgXLP6ewTrSuBkTrqE8wj/,test2:$$apr1$$d9hr9HBB$$4HxwgUir3HP4EsggP/QNo0"
  33. networks:
  34. traefik:
  35. wg-gen-web:
  36. wg-json-api:
  37. image: james/wg-api:latest
  38. container_name: wg-json-api
  39. restart: unless-stopped
  40. cap_add:
  41. - NET_ADMIN
  42. network_mode: "host"
  43. command: wg-api --device wg0 --listen 172.20.1.1:8182
  44. networks:
  45. traefik:
  46. external:
  47. name: traefik
  48. wg-gen-web:
  49. driver: bridge
  50. name: wg-gen-web
  51. ipam:
  52. driver: default
  53. config:
  54. - subnet: 172.20.1.0/24