https://github.com/joegasewicz/process-runner
Run many processes
https://github.com/joegasewicz/process-runner
Last synced: 3 months ago
JSON representation
Run many processes
- Host: GitHub
- URL: https://github.com/joegasewicz/process-runner
- Owner: joegasewicz
- License: mit
- Created: 2022-05-02T03:55:36.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-06-13T09:01:20.000Z (over 3 years ago)
- Last Synced: 2025-04-10T18:46:04.591Z (6 months ago)
- Language: Go
- Homepage:
- Size: 3.3 MB
- Stars: 9
- Watchers: 2
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Process Runner
Runs many processes### Config
Create a `prconfig.yaml` file. Name a process & add the relevant commands and arguments.
```yaml
processes:
sass:
directory: examples/frontend
command: sass
args: ["sass/index.scss", "css/index.css", "--watch"]
bash:
directory: examples/bash
command: ./test.sh
env:
SERVER_NAME: "Columbo"
```
### Run all processes
```bash
go run process_runner.go -dir
```
If any process exits unexpectedly, then process-runner will exit with the error details for that process.### `prconfig` Config
- **processes**
Top level of the processes config file
- **[name]**
This is the process name you want to assign (it can be any string)
- **directory**
The relative or absolute path to the directory that the process will be run from
- **command**The command that will be run eg. go, ./, make ... .etc
- **args**
The command arguments as an array e.g `["-t", "-o"]`
- **env**Sets environment variables for the process.
### Run multiple MUX Go Servers
```yaml
processes:
server_1:
directory: examples/servers/server_1
command: go
args: ["run", "serverOne.go"]
server_2:
directory: examples/servers/server_2
command: go
args: ["run", "serverTwo.go"]
... etc.
```### Example Output
This example logs to std output a Go's mux server's logs / std output