1 Star 0 Fork 0

eig / go-procfile-util

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

go-procfile-util CircleCI

A tool for interacting with Procfiles.

Installation

Install it using the "go get" command:

go get github.com/josegonzalez/go-procfile-util

Usage

All commands take a -P or --procfile flag to specify an alternative Procfile path. If not specified, procfile-util will attempt to read the Procfile from the current directory.

check

check that the specified procfile is valid

procfile-util check

delete

delete a process type from a procfile

This command does not retain comments or extra newline characters. Specifying both the write-path and stdout flags will result in an error.

# delete the web process and write the file
procfile-util delete --process web

# delete the web process and write output to other.Procfile
procfile-util delete --process web --write-path other.Procfile

# delete the web process and write output to stdout
procfile-util delete --process web --stdout

exists

check if a process type exists

# returns 0 if the web process type exists
procfile-util exists -p web

# returns 1 if the non-existent process type does not exist
procfile-util exists -p non-existent

expand

expands a procfile against a specific environment

# expand variables with no implicit env vars
# will result in empty string for variable replacements
procfile-util expand

# specify a default-port to use (default: 5000)
procfile-util expand --default-port 3000

# expand variables with getenv used for variable expansion
# may use any variable available when executing procfile-util
procfile-util expand --allow-getenv

# expand variables with a parsed .env file used for variable expansion
procfile-util expand --env-file .env

# combines getenv and .env file parsing to provide variable expansion
procfile-util expand --allow-getenv --env-file .env

# specify the default-port when performing variable expansion
procfile-util expand --allow-getenv --env-file .env --default-port 3000

export

export the application to another process management format

Due to argument parsing limitations, the --location flag is currently required.

In addition, not all formats support all arguments, and not all arguments have examples below.

# export systemd init files to the `tmp` directory
# support formats include: [launchd, runit, systemd, systemd-user, sysv, upstart]
# the default format is: systemd
procfile-util export --format systemd --location tmpp

# override the app name
procfile-util export --location tmp --app node-js-app

# set the group and user used to launch processes
procfile-util export --location tmp --group root --user root

# set a working directory path for the process
procfile-util export --location tmp --working-directory /root

list

list all process types in a procfile

procfile-util list

set

set the command for a process type in a procfile

This command does not retain comments or extra newline characters. Specifying both the write-path and stdout flags will result in an error.

# set the web process and write the file
procfile-util set --process web --command "python app.py -p $PORT"

# set the web process and write output to other.Procfile
procfile-util set --process web --command "python app.py -p $PORT" --write-path other.Procfile

# set the web process and write output to stdout
procfile-util set --process web --command "python app.py -p $PORT" --stdout

show

show the command for a specific process type

# shows the command for the web process
procfile-util show -p web

# shows the command for the web process
# specify a default-port to use (default: 5000)
procfile-util show -p web --default-port 3000

# shows the command for the web process
# expand variables with getenv used for variable expansion
# may use any variable available when executing procfile-util
procfile-util show -p web --allow-getenv

# shows the command for the web process
# expand variables with a parsed .env file used for variable expansion
procfile-util show -p web --env-file .env

# shows the command for the web process
# combines getenv and .env file parsing to provide variable expansion
procfile-util show -p web --allow-getenv --env-file .env

# shows the command for the web process
# specify the default-port when performing variable expansion
procfile-util show web --allow-getenv --env-file .env --default-port 3000
The MIT License Copyright (c) 2018 Jose Diaz-Gonzalez Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

暂无描述 展开 收起
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/eignil/go-procfile-util.git
git@gitee.com:eignil/go-procfile-util.git
eignil
go-procfile-util
go-procfile-util
master

搜索帮助