Thanks to awesome @alexellis for this contribution:
- Set an Inlets Token
export INLETS_TOKEN=abcd1234
- Deploy Inlets on Akash using the below config:
cat > inlets.yml <<EOF
---
version: "1.0"
services:
inlets:
image: inlets/inlets:2.6.1
args:
- server
- --control-port=8081
- --port=8081
- --token=$INLETS_TOKEN
expose:
- port: 8081
as: 80
to:
- global: true
profiles:
compute:
inlets:
cpu: "0.25"
memory: "512Mi"
disk: "1G"
placement:
global:
pricing:
inlets: 500u
deployment:
inlets:
global:
profile: inlets
count: 1
EOF
Deploy:
akash deployment create inlets.yml
- Start an inlets client with the domain mapping you got from previous step to your local service. For example, if the akash domain mapping is
m6bsdofuf3dzl4mdxq6w6y.marx.akashtest.net
and your local service is running on port3000
, run the below:
inlets client --remote ws://m6bsdofuf3dzl4mdxq6w6y.marx.akashtest.net:80 --upstream http://127.0.0.1:3000 --token $INLETS_TOKEN