heroku-buildpack-nano

by velizarn

GitHub Readme.md

heroku-buildpack-nano

Heroku buildpack that installs Nano text editor

How it works

Installs Nano Ninja version from Ehryk's repository heroku-nano or if you prefer you can set a config var to download Nano from a custom location.

Nano installation ends in /app/vendor/nano directory.

Example usage

-----> Build succeeded!
-----> heroku-buildpack-nano app detected
    -> Custom nano URL is not set, start downloading from default location
    -> Downloading Nano... (https://github.com/Ehryk/heroku-nano/raw/master/heroku-nano-2.5.1/nano.tar.gz)
    -> Installing Nano...
    DONE
-----> Discovering process types

Configure from CLI

heroku buildpacks:add https://github.com/velizarn/heroku-buildpack-nano

Configure from app manifest

{
    "buildpacks": [
        {
            "url": "https://github.com/velizarn/heroku-buildpack-nano"
        }
    ]
}

Add custom download location

If you prefer to deploy your own nano archve you can set a config var to download Nano from a custom location, e.g.

heroku config:set NANO_URL_CUSTOM=https://your-custom-url.domain.tld/nano.tar.gz

Example usage

-----> Build succeeded!
-----> heroku-buildpack-nano app detected
    -> Downloading Nano... (https://mycustomurl.rackcdn.com/nano-2.5.1.tar.gz)
    -> Installing Nano...
    DONE
-----> Discovering process types

Resources

Troubleshooting

If your application runs on heroku-20 stack and nano cannot be executed due to a following error or a similar one:

nano: error while loading shared libraries: libncursesw.so.5: cannot open shared object file: No such file or directory

In this case you can remove Nano buildpack and use heroku/heroku-buildpack-apt instead. With this buildpack you can install additional packages that are not included in the stack image. Even with the fork velizarn/heroku-buildpack-apt you can define those packages in a config var instead of an Aptfile.

License

MIT © Velizar Nenov