Skip to content

Setup: Heroku

Brian Graham edited this page May 9, 2018 · 4 revisions

Random shelf-life

Heroku forces a reset of every dyno every 24 hours plus a random number of minutes between 1 and 216. You can't do anything to disable that.

Because secrets are stored in memory, you might not want to host it on Heroku, they'll randomly get dropped every day. If your use case is sharing between coworkers and you can re-send it easily, it might be fine.

However, it is an easy deployment platform and probably will only take you a few minutes to get running with a domain URL and TLS.

Deploy

git clone https://github.com/Incognito/one-time-secret
cd one-time-secret

heroku create one-time-secret
heroku git:remote -a one-time-secret

echo "web: node dist/bin/cli.js web:start" > Procfile # Tells heroku how to start a web dyno
git add Procfile
git commit -m "Tell heroku how to run the web worker" 

heroku config:set PUBLISH_SECRET_URI='/new'
heroku config:set KEY_NAME_RANDOM_BYTES=128
heroku config:set PORT=80
heroku config:set DOMAIN=example.com # Change this to the real domain
heroku config:set HTTP_TIMEOUT_MS=5000
heroku config:set MAX_UPLOAD_KB=128


git push heroku master

Lastly look up how to map your DNS records and SSL.

  1. https://devcenter.heroku.com/articles/ssl
  2. https://devcenter.heroku.com/articles/custom-domains
Clone this wiki locally