diff --git a/README.md b/README.md index 0309807..f8c5d8c 100644 --- a/README.md +++ b/README.md @@ -40,3 +40,19 @@ lt --host http://sub.example.tld:1234 --port 9000 You will be assigned a URL similar to `qdci.sub.example.com:1234`. If your server is acting as a reverse proxy (i.e. nginx) and is able to listen on port 80, then you do not need the `:1234` part of the hostname for the `lt` client. + +## Deploy + +You can deploy your own localtunnel server using the prebuilt docker image. + +**Note** This assumes that you have a proxy in front of the server to handle the http(s) requests and forward them to the localtunnel server on port 3000. You can use our [localtunnel-nginx](https://github.com/localtunnel/nginx) so accomplish this. + +If you do not want ssl support for your own tunnel (not recommended), then you can just run the below with `--port 80` instead. + +``` +docker run -d \ + --restart always \ + --name localtunnel \ + --net host \ + defunctzombie/localtunnel-server:latest --port 3000 +``` diff --git a/bin/server b/bin/server index b929958..e352884 100755 --- a/bin/server +++ b/bin/server @@ -41,5 +41,9 @@ process.on('SIGINT', () => { process.exit(); }); +process.on('SIGTERM', () => { + process.exit(); +}); + // vim: ft=javascript