Last active
May 20, 2016 11:53
-
-
Save nuxlli/3c387c6ca68493b923c1 to your computer and use it in GitHub Desktop.
Azk templates examples
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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(); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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