Skip to content

Heroku

Automatic way (One-Click Template button)

  • Check Variables
  • If you are using a heroku-addon as redis database , then first set an empty string in REDIS_URL then follow step 4.a from Manual way

Deploy

Manual way (git + Heroku CLI)

  1. Install Heroku CLI
  2. Clone Repo
    git clone https://github.com/iamrony777/javinfo-api
    
  3. Login into Railway account, create a new app
    cd javinfo-api 
    APP_NAME=""  # set app name as variable 
    heroku login # Finish login process
    heroku apps:create $APP_NAME 
    heroku git:remote --app $APP_NAME
    heroku stack:set container --app $APP_NAME
    
  4. Using persistence database Addon (optional if you already using any Online redis service eg. Redislab, Upstash etc)

    1. Upstash-Redis Addon (heroku verified account required)

      heroku addons:create upstash-redis:free --as REDIS --app $APP_NAME
      
      ** must add addon with --as REDIS parameter

    2. Free hosted database

      1. Upstash
      2. RedisLabs

      Create a redis uri from USERNAME , PASSWORD , HOST , PORT provided from server and modify environment variables

      heroku config:set --app $APP_NAME REDIS_URL=<connection-url>
      
  5. Set Environmental Variables

    Variable template

    (copy-paste, edit and remove empty variables)

    API_USER & API_PASS are required to start the server and it is recommened to set APP_NAME also. (set REDIS_URL if not using upstash-redis addon)

    API_USER=""
    API_PASS=""
    CREATE_REDIS="false" 
    LOG_REQUEST="false"
    PLATFORM="heroku"
    CAPTCHA_SOLVER_URL="https://captcha-solver-api2.herokuapp.com" 
    JAVDB_EMAIL=""
    JAVDB_PASSWORD=""
    REMEMBER_ME_TOKEN="" 
    JDB_SESSION=""
    IPINFO_TOKEN=""
    INACTIVITY_TIMEOUT="60" 
    TZ="UTC"
    HEALTHCHECK_PROVIDER="None"
    UPTIMEKUMA_PUSH_URL=""
    HEALTHCHECKSIO_PING_URL=""
    APP_NAME=""