This tutorial is designed to assist people who want to have a step-by-step guide to deploy the Lumber-generated admin backend to Heroku.
If you don’t have a Heroku account yet, sign up here. Then, create your first Heroku application (1) (2).
After creating your application, simply follow the Heroku guide “Deploy using Heroku Git” to push the lumber-generated admin backend code to the Heroku application.
Push your code using the following command:
git push heroku master
Counting objects: 25, done.Delta compression using up to 4 threads.Compressing objects: 100% (20/20), done.Writing objects: 100% (25/25), 21.56 KiB | 5.39 MiB/s, done.Total 25 (delta 9), reused 0 (delta 0)remote: Compressing source files... done.remote: Building source:remote:remote: -----> Node.js app detectedremote:remote: -----> Creating runtime environmentremote:remote: NPM_CONFIG_LOGLEVEL=errorremote: NODE_VERBOSE=falseremote: NODE_ENV=productionremote: NODE_MODULES_CACHE=trueremote:remote: -----> Installing binariesremote: engines.node (package.json): unspecifiedremote: engines.npm (package.json): unspecified (use default)remote:remote: Resolving node version 8.x...remote: Downloading and installing node 8.11.4...remote: Using default npm version: 5.6.0remote:remote: -----> Restoring cacheremote: Skipping cache restore (not-found)remote:remote: -----> Building dependenciesremote: Installing node modules (package.json + package-lock)remote: added 246 packages in 7.72sremote:remote: -----> Caching buildremote: Clearing previous node cacheremote: Saving 2 cacheDirectories (default):remote: - node_modulesremote: - bower_components (nothing to cache)remote:remote: -----> Pruning devDependenciesremote: Skipping because npm 5.6.0 sometimes fails when running 'npm prune' due to a known issueremote: https://github.com/npm/npm/issues/19356remote:remote: You can silence this warning by updating to at least npm 5.7.1 in your package.jsonremote: https://devcenter.heroku.com/articles/nodejs-support#specifying-an-npm-versionremote:remote: -----> Build succeeded!remote: -----> Discovering process typesremote: Procfile declares types -> (none)remote: Default types for buildpack -> webremote:remote: -----> Compressing...remote: Done: 24.2Mremote: -----> Launching...remote: Released v3remote: https://lumber-deploy-to-production.herokuapp.com/ deployed to Herokuremote:remote: Verifying deploy... done.To https://git.heroku.com/lumber-deploy-to-production.git* [new branch] master -> master
Your admin backend is now deployed in a remote Heroku application. 🎉
The last step to have a complete running application is to deploy a database remotely.
For this, you can follow our Populate a remote database how-to.
This does not mean your project is deployed to production on Forest Admin. To deploy to production, check out this section after you've completed the above steps.