• Sign In



  • Categories

    Extension Details



    Readme

    Procfile extension for Nova

    A Nova extension with support for Procfiles.

    The Procfile is mostly known for its use by Heroku and Foreman. However, it is supported by a number of other services and utilities, and is extremely handy for development. With this .env file:

    DJANGO_SETTINGS_MODULE=my_site.settings.local
    WEB_HOST=0.0.0.0:8000
    BROWSERSYNC_PORT=9000
    

    … and this Procfile:

    # Run the Django Web app.
    django: django-admin runserver "$WEB_HOST"
    
    # Monitor and rebuild all static/front-end assets.
    assets: npm run watch
    
    # Run Browser Sync proxied to the Django Web app.
    djsync: browser-sync start --proxy="$WEB_HOST" --port="$BROWSERSYNC_PORT"
    

    You can run honcho start and have it all up and running!

    Features

    Syntax Highlighting

    Procfiles are highlighted not only to show what a valid process definition is, but it also highlights the command to run using the shell highlighter.

    Symbol Navigation

    You have probably never seen a long Procfile, but just in case you do, this extension has you covered! You can navigate through the processes with the symbol navigator or the command palette.

    Release Notes

    See CHANGELOG.

    Todo

    There are still a few things I plan to do.

    Features

    • Add diagnostics to warn if a process name is not unique.
    • Add formatting capabilities.
    • Add automatic tasks for running Procfiles.

    Procfile runners: Foreman & Clones

    The most used and robust are:

    Others include:

    • node-foreman (Node) — n.b. How on earth is this not named “Noreman”? I insist on referring to it as such!
    • Shoreman (Shell)
    • forego (Go)

    There is no published standard for Procfile syntax, but Foreman can be used as the reference implementation. Though the various runners recognize different things as comments, process, or errors, Foreman’s syntax is recognized by this extension.

    Procfile Foreman Honcho Goreman Noreman Shoreman forego
    n0:·…
    n1:…
    n-4:·… # *
    # n3:·… # # # # #
    #n4:·… # # # # #
    n5·:… # #
    ·n6:·… # #
    n·7:·… # # ✓ / ✗
    n8·:·… # #
    n9·… # # #
    legend
    valid process
    ignored / comment #
    error / hang

    * Support for dashes is coming to Honcho (PR #218).

    Release Notes

    Changelog

    0.1.0

    Initial release of nova-procfile extension.

    License

    BSD 3-Clause License

    Copyright (c) 2020, Ben Spaulding. All rights reserved.

    Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

    1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

    2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

    3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.