Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server host binding #186

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

inertia186
Copy link
Contributor

As a testnet maintainer, I would like the tinman server module to bind the host on 0.0.0.0, so that external browsers can access the module.

In development, I was always testing http://localhost:5000/account_create, but when deploying to a docker container, it couldn't be accessed, even with -p 5000:5000. Turns out, Flask defaults host bindings to 127.0.0.1.

After merging this pull request, the following script will launch the tinman server module to host the account creation form (/account_create) on port 5000, assuming that the same host is serving the steemd API on port 8091:

#!/bin/bash

cd $HOME

source ~/ve/tinman/bin/activate

jq ".shared_secret=\"$SHARED_SECRET\"" $HOME/tinman/server.conf.example > $HOME/server.conf.temp
jq ".transaction_target.node=\"http://127.0.0.1:8091\"" $HOME/server.conf.temp > $HOME/server.conf
rm $HOME/server.conf.temp

echo tintoy: starting server on port 5000
tinman server \
  --get-dev-key $UTILS/get_dev_key \
  --signer $UTILS/sign_transaction \
  --timeout 600 \
  --chain-id $CHAIN_ID

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants