Skip to content

Instantly share code, notes, and snippets.

@nuxlli
Last active May 20, 2016 11:53
Show Gist options
  • Select an option

  • Save nuxlli/3c387c6ca68493b923c1 to your computer and use it in GitHub Desktop.

Select an option

Save nuxlli/3c387c6ca68493b923c1 to your computer and use it in GitHub Desktop.
Azk templates examples
questions({
add_depends: question("Qual sistema depende de mail"),
});
systems({
mail: {
// Dependent systems
depends: [ ],
image: { docker: "schickling/mailcatcher" },
http: {
domains: [ "#{system.name}.#{question.add_depends}.#{azk.default_domain}" ]
},
ports: {
http: '1080/tcp',
smtp: '1025/tcp',
},
},
});
pos(function(context, next) {
context.depends[context.question.add_depends] = ["mail"];
next();
});
questions({
ngrok_depends: question("What system does ngrok depends"),
ngrok_key: question("What is your ngrok key", { type: "password" }),
image_version: question("What is the version of the azukiapp/ngrok", { default: 'latest' }),
});
systems({
ngrok: {
// Dependent systems
depends: [ '#{question.ngrok_depends}' ],
image : { docker: "azukiapp/ngrok:#{question.image_version}" },
// not expect application response
wait: {"retry": 20, "timeout": 1000},
http: {
domains: [ "#{manifest.dir}-#{system.name}.#{azk.default_domain}" ],
},
ports: {
http: "4040"
},
envs : {
NGROK_CONFIG: "/ngrok/ngrok.yml",
NGROK_LOG : "/tmp/ngrok.log",
}
}
});
pos(function(context, next) {
add_env("NGROK_KEY", context.question.ngrok_key); // .env
next();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment