GithubHelp home page GithubHelp logo

aequitasetveritas / inlets-heroku-tutorial Goto Github PK

View Code? Open in Web Editor NEW

This project forked from alexellis/inlets-heroku-tutorial

0.0 1.0 0.0 3 KB

Run inlets on Heroku to tunnel local endpoints for free

Home Page: https://docs.inlets.dev

Dockerfile 100.00%

inlets-heroku-tutorial's Introduction

inlets-heroku-tutorial

Run an inlets server on Heroku.

Conceptual diagram

inlets is a service tunnel and reverse proxy. It can be used to punch out local endpoints to another network, or the Internet.

See inlets/inlets on GitHub.

Deployment

In order to run inlets on Heroku, you can use the container image facility and then set an auth token using Heroku's environment variable store. There is no need to rebuild the whole container from scratch, just inherit the official image and override the CMD.

Push a container image

  • Log into your dahsboard, create an app and get the CLI:

https://dashboard.heroku.com

  • Login:
heroku container:login
  • Deploy:
heroku container:push web -a my-inlets
heroku container:release web -a my-inlets
heroku restart web -a my-inlets
  • Set auth token
export TOKEN=$(head -c 16 /dev/urandom | shasum | cut -f1 -d" ")
echo "Token is: ${TOKEN}"

export HEROKU_APP=my-inlets

heroku config:set TOKEN=${TOKEN} --app $HEROKU_APP
echo $TOKEN > token
  • Run a test server
mkdir -p /tmp/inlets
cd /tmp/inlets
uname > README.md
python -m SimpleHTTPServer
  • Connect the inlets client
export HEROKU_APP="my-inlets"

inlets client \
  --remote wss://${HEROKU_APP}.herokuapp.com \
  --token $(cat token) \
  --upstream http://127.0.0.1:8000
  • Now test the tunnel:
https://${HEROKU_APP}.herokuapp.com/

inlets-heroku-tutorial's People

Contributors

alexellis avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.