Skip to content

Instantly share code, notes, and snippets.

@kurtzilla
Last active January 16, 2017 16:33
Show Gist options
  • Save kurtzilla/d9393676c3c51ebdba947072d4ab4cd4 to your computer and use it in GitHub Desktop.
Save kurtzilla/d9393676c3c51ebdba947072d4ab4cd4 to your computer and use it in GitHub Desktop.
My steps to heroku deploy
fork master branch: git@github.com:ctrlplusb/react-universally.git
@commit 28769d1e11702c4c4acb3aa26650215a38986527
git clone git@github.com:[my-fork]/react-universally.git [my-repo]
cd [my-repo]
npm install
touch .slugignore
echo yarn.lock >> .slugignore
edit config/index.js
change line 23:
port: getIntEnvVar('SERVER_PORT', 1337),
to:
port: getIntEnvVar('PORT', 1337),
edit ./package.json
add to scripts:
"postinstall": "npm run build"
Create Heroku app:
heroku create [my-heroku-universe]
heroku config:set NPM_CONFIG_PRODUCTION=false
git add .
gcmsg 'deploy to heroku'
git push heroku master
heroku open && heroku logs -t
LOGS:
2017-01-16T16:03:28.873506+00:00 heroku[web.1]: Starting process with command `npm start`
2017-01-16T16:03:33.844060+00:00 app[web.1]:
2017-01-16T16:03:33.844087+00:00 app[web.1]: > react-universally@12.0.0 start /app
2017-01-16T16:03:33.844094+00:00 app[web.1]: > cross-env NODE_ENV=production node build/server
2017-01-16T16:03:33.844095+00:00 app[web.1]:
2017-01-16T16:03:34.817241+00:00 app[web.1]: Server listening on port 48842
2017-01-16T16:04:29.359501+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2017-01-16T16:04:29.359627+00:00 heroku[web.1]: Stopping process with SIGKILL
2017-01-16T16:04:29.475612+00:00 heroku[web.1]: Process exited with status 137
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment