A platform helps to run everythings base on a yaml script file
Install via npm
npm install -g ymlr
Install via yarn
yarn global add ymlr
- ymlr-mqtt Pub/sub messages to channels in mqtt
- ymlr-redis Handle redis into ymlr platform
- ymlr-telegram Send telegram text, photo..., support "listen", "command", "hears"... in telegram bot
- ymlr-sql Execute query to mysql, postgresql, orable, sqlite...
- ymlr-cron Schedule jobs to do something base on cron pattern
Run a scene file
ymlr $PATH_TO_SCENE_FILE
Run a encrypted scene file with a password
ymlr $PATH_TO_SCENE_FILE $PASSWORD
Override env variables then run
ymlr -e "port=80" -e "log=error" -- $PATH_TO_SCENE_FILE
Show helps
ymlr -h
Show all tags version
ymlr
Add new external tags, libraries which is used in the scene
ymlr add ymlr-telegram@latest
Upgrade external tags, libraries which is used in the scene
ymlr up ymlr-telegram@latest
Remove external tags, libraries which is used in the scene
ymlr rm ymlr-telegram@latest
Customize source paths which are registed tags in your application
ymlr --tag-dirs /myapp1 --tag-dirs /myapp2 -- myapp.yaml # "/myapp1", "/myapp2" are includes source code
Override show debug log for all of tags
ymlr --debug=all -- myapp.yaml
Docker image file: circle2jt/ymlr
Run a scene file.
Default is /script/index.yaml
, you can override it in commands
$PASSWORD
is optional when run a encrypted scene file
docker run -v $PATH_TO_SCENE_FILE:/scripts/index.yaml --rm -it circle2jt/ymlr /scripts/index.yaml $PASSWORD
Run a specific file
docker run -v $PATH_TO_SCENE_DIR:/scripts --rm -it circle2jt/ymlr /scripts/$PATH_TO_SCENE_FILE
- Create a scene file at
test.yaml
name: Test scene
runs:
- echo: Hello world
- name: Get post data
http'get:
url: http://localhost:3000/posts
vars: postData
- echo: ${ $vars.postData }
- Run
ymlr test.yaml