mikelangelo-project / capstan

Capstan, a tool for packaging and running your application on OSv.
http://osv.io/capstan/
Other
19 stars 7 forks source link

Support package bootcmd inheritance #46

Closed miha-plesko closed 7 years ago

miha-plesko commented 7 years ago

With this commit we support contextualization of required package's boot configuration. For example, if we require a package node-4.4.5 that contains following meta/run.yaml:

runtime: native
config_set:
  node:
    bootcmd:  /node $NODE_ARGS $MAIN $ARGS
    NODE_ARGS: --no-deprecation

then we are now able to reference it from our own meta/run.yaml using 'base' attribute like this:

runtime: native
config_set:
  medo:
    base: "node-4.4.5:node"
    env:
      MAIN: /medo-application.js
      ARGS: 127.0.0.1

and it will result in following script being created:

# /run/medo 
--env=MAIN?=/medo-application.js --env=NODE_ARGS?=--no-deprecation --env=ARGS?=127.0.0.1 /node $NODE_ARGS $MAIN $ARGS

Depends on https://github.com/mikelangelo-project/capstan/pull/44

gberginc commented 7 years ago

@miha-plesko please squash and repush

miha-plesko commented 7 years ago

Done