diff --git a/README.md b/README.md index cd39cff..d9d23dd 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ Options: Open your browser on `http://yourserver:3000/wetty` and you will prompted to login. Or go to `http://yourserver:3000/wetty/ssh/` to specify the -user before hand. +user beforehand. If you run it as root it will launch `/bin/login` (where you can specify the user name), else it will launch `ssh` and connect by default to `localhost`. The @@ -81,6 +81,24 @@ Check out the [Flags docs](https://github.com/butlerx/wetty/blob/master/docs/flags.md) for a full list of flags +### Docker container + +To use wetty as a docker container, a docker image is available on +[docker hub](https://hub.docker.com/r/wettyoss/wetty). To run this image, use + +```sh +docker run --rm -p 3000:3000 wettyoss/wetty --ssh-host= +``` + +and you will be able to open a ssh session to the host given by `YOUR-IP` under +the URL [http://localhost:3000/wetty](http://localhost:3000/wetty). + +It is recommended to drive wetty behind a reverse proxy to have HTTPS security +and possibly Let’s Encrypt support. Popular containers to achieve this are +[nginx-proxy](https://github.com/nginx-proxy/nginx-proxy) and +[traefik](https://traefik.io/traefik/). For traefik there is an example +docker-compose file in the containers directory. + ## FAQ Check out the [docs](https://github.com/butlerx/wetty/tree/master/docs) diff --git a/containers/docker-compose.traefik.yml b/containers/docker-compose.traefik.yml new file mode 100644 index 0000000..7b35593 --- /dev/null +++ b/containers/docker-compose.traefik.yml @@ -0,0 +1,19 @@ +version: '2' + +services: + wetty: + image: wettyoss/wetty + command: + - --base=/ + - --ssh-host=ssh.example.com + labels: + - "traefik.enable=true" + - "traefik.http.routers.wetty.rule=Host(`wetty.example.com`)" + + reverse-proxy: + image: traefik + command: --providers.docker + ports: + - "80:80" + volumes: + - /var/run/docker.sock:/var/run/docker.sock