Skip to content

Instantly share code, notes, and snippets.

@MSakamaki
Last active February 1, 2022 14:50
Show Gist options
  • Save MSakamaki/a40b0a8dac86c2bf1b8880c3fa3f1b50 to your computer and use it in GitHub Desktop.
Save MSakamaki/a40b0a8dac86c2bf1b8880c3fa3f1b50 to your computer and use it in GitHub Desktop.
heroku infomation

heroku + mobtime

clone repository

git clone https://github.com/mobtimeapp/mobtime.git

add package.json scripts

{
  "scripts": {
    "heroku-postbuild": "npm run tailwind",
  }
}

heroku settings

heroku login

# create apps
heroku create [app name]

# add heroku redis free plan
heroku addons:create heroku-redis:hobby-dev

# check redis
heroku addons | grep heroku-redis

# wait created
heroku addons:info [radis name]

# check redis REDIS_URL
heroku config | grep REDIS

add Buildpacks

  1. heroku/nodejs

create Procfile file

# REDIS_URL eq redis://:[password]@[host]:[port]
web: REDIS_HOST=:[password]@[host] REDIS_PORT=[redis port] APP_HOST=0.0.0.0 APP_PORT=$PORT npm start

help

# app restart
heroku restart --app [app name]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment