https://github.com/anystack-sh/porter Skip to content Toggle navigation Sign up * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code + Explore + All features + Documentation + GitHub Skills + Blog * Solutions + For + Enterprise + Teams + Startups + Education + By Solution + CI/CD & Automation + DevOps + DevSecOps + Case Studies + Customer Stories + Resources * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles + Repositories + Topics + Trending + Collections * Pricing [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this organization All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} anystack-sh / porter Public * Notifications * Fork 3 * Star 168 Spin up your development background processes with ease anystack.sh/tools/porter 168 stars 3 forks Star Notifications * Code * Issues 1 * Pull requests 1 * Discussions * Actions * Security * Insights More * Code * Issues * Pull requests * Discussions * Actions * Security * Insights anystack-sh/porter This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. main Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags Name already in use A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch? Cancel Create 1 branch 2 tags Code * Local * Codespaces * Clone HTTPS GitHub CLI [https://github.com/a] Use Git or checkout with SVN using the web URL. [gh repo clone anysta] Work fast with our official CLI. Learn more. * Open with GitHub Desktop * Download ZIP Sign In Required Please sign in to use Codespaces. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching Xcode If nothing happens, download Xcode and try again. Launching Visual Studio Code Your codespace will open once ready. There was a problem preparing your codespace, please try again. Latest commit @PhiloNL PhiloNL Build 0.0.2 ... c9bb7a6 Dec 27, 2022 Build 0.0.2 c9bb7a6 Git stats * 8 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time app Add check to ensure Porter is running Dec 27, 2022 bootstrap Initial commit Dec 26, 2022 builds Build 0.0.2 Dec 27, 2022 config Initial commit Dec 26, 2022 tests Initial commit Dec 26, 2022 .editorconfig Initial commit Dec 26, 2022 .gitattributes Initial commit Dec 26, 2022 .gitignore Initial commit Dec 26, 2022 README.md Add init command Dec 27, 2022 box.json Initial commit Dec 26, 2022 composer.json Initial commit Dec 26, 2022 composer.lock Initial commit Dec 26, 2022 phpunit.xml.dist Initial commit Dec 26, 2022 porter Initial commit Dec 26, 2022 View code [ ] About Porter Installation Requirements Add your first project Monitoring services Tail service logs All available commands Brought to you by Anystack License README.md Total Downloads Latest Stable Version License About Porter Porter is a command-line interface (CLI) tool that makes it easy to run background services by adding a few lines to a configuration file. These services are managed by Supervisord, a process control system that ensures that all processes are kept up and running. With Porter, you don't have to manually start and manage background services in multiple terminal tabs. Instead, you can simply use the porter command to manage all of your services in a single place. Installation To install Porter, you can use composer or download the build manually from this repository. composer global require anystack-sh/porter Requirements To use Porter you must install supervisord: * macOS: brew install supervisor * Linux: apt install supervisor Add your first project In your terminal navigate to your project and run porter init to create a boilerplate porter.yml: ~/Developer/anystack: $ porter init Create porter.yml in /Users/Developer/anystack? (yes/no) [yes]: > yes Creating porter.yml boilerplate: Run "porter add" to add your product and start your services. Modify porter.yml and add the services you want to run. In your terminal navigate to your project and run porter add: ~/Developer/anystack: $ porter add Creating porter.yml boilerplate: Adding /Users/Developer/anystack: Restarting Porter: A new porter.yml has been created. This file contains all the services you want to run in the background, for example: services: - name: Queue command: php artisan horizon restartInMinutes: 1 - name: Vite command: npm run dev - name: Octane command: php artisan octane:start --port=8000 --no-interaction The following properties are available per command: Property Description Required name Shortname that describes your service. Yes command The command to run relative to the root of Yes your project. restartInMinutes After how many minutes the services should No restart. If you have made changes to your porter.yml you can use the porter restart command to apply your changes. Monitoring services To monitor your services you can use the porter status command. ~/Developer/anystack: $ porter status +----------+-----------------+---------+---------------------------+ | App | Name | Status | Description | +----------+-----------------+---------+---------------------------+ | anystack | anystack-octane | RUNNING | pid 41277, uptime 0:03:29 | | anystack | anystack-queue | RUNNING | pid 41275, uptime 0:03:29 | | anystack | anystack-vite | RUNNING | pid 41276, uptime 0:03:29 | +----------+-----------------+---------+---------------------------+ Tail service logs You can tail one or more services (unified) using the porter tail command. This command is context-aware and will automatically ask which services do you want to tail: ~/Developer/anystack: $ porter tail Which service do you want to tail?: [0] anystack-octane [1] anystack-queue [2] anystack-vite > 0,1 Use CTRL+C to stop tailing. Horizon started successfully. INFO Server running... Local: http://127.0.0.1:8000 200 GET / ... 33.38 mb 79.10 ms All available commands Command Description porter add Add current directory as a new application. porter remove Remove current application services. porter start Start all services. porter restart Restart all services. porter stop Stop all services. porter tail Tail service logs. Brought to you by Anystack Anystack is the all-in-one product platform that helps you make a living by writing code. Push your code to GitHub, and we will take care of everything else. Start your adventure today. License Porter is open-sourced software licensed under the MIT license. About Spin up your development background processes with ease anystack.sh/tools/porter Topics productivity php laravel supervisor laravel-package development-workflow development-tools background-service Resources Readme Stars 168 stars Watchers 1 watching Forks 3 forks Releases 2 v0.0.2 Latest Dec 27, 2022 + 1 release Languages * PHP 100.0% Footer (c) 2022 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.