vx3r / wg-gen-web

Simple Web based configuration generator for WireGuard

Home Page:https://wg-gen-web-demo.127-0-0-1.fr

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

docker-compose example, not expose just ports

DoTheEvo opened this issue · comments

in the readme, the example docker compose file
expose is for inner stuff I think, ports is how the browser gets inside

current:

version: '3.6'
services:
  wg-gen-web:
    image: vx3r/wg-gen-web:latest
    container_name: wg-gen-web
    restart: unless-stopped
    expose:
      - "8080/tcp"

I think it should be

version: '3.6'
services:
  wg-gen-web:
    image: vx3r/wg-gen-web:latest
    container_name: wg-gen-web
    restart: unless-stopped
    ports:
      - 8080:8080
commented

@DoTheEvo you are right! Usually folks have a revers proxy running in the same network as the container so you expose and point RP to the exposed port on container. But to make thing simple i should change it to ports. PRs are welcome :)

Can I ask how one exposes the actual VPN port to the internet if only port 8080 is used? A similar container to this one known as "weejewel/wg-easy" has a port for the web UI management (51821) and then another port for the actual VPN access (51820). In comparison, is wg-gen-web always expected to be paired up with something like Caddy or can it work alone with straight router port forwarding?

commented

wg-gen-web is a configuration generator, it assumes that your vpn service is correctly configured to pick up the config files.
you can expose web port directly if you want, it’s just in multi container setup you usually have one revers proxy exposing what need to be exposed, it’s juste a best practice.