Last active
August 29, 2015 14:15
-
-
Save gullitmiranda/198beee70ea50720a41f to your computer and use it in GitHub Desktop.
Azkfile.js to UMRUM
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
| systems({ | |
| umrum: { | |
| // Dependent systems | |
| depends: ["redis", "mongodb"], | |
| // More images: http://images.azk.io | |
| image: {"docker": "azukiapp/node"}, | |
| // Steps to execute before running instances | |
| provision: [ | |
| "npm install", | |
| "grunt compile" | |
| ], | |
| workdir: "/azk/#{manifest.dir}", | |
| shell: "/bin/bash", | |
| command: "grunt server", | |
| wait: {"retry": 20, "timeout": 10000}, | |
| mounts: { | |
| '/azk/#{manifest.dir}': path(".", { vbox: true } ), | |
| }, | |
| scalable: {"default": 2}, | |
| http: { | |
| domains: [ "#{system.name}.#{azk.default_domain}" ] | |
| }, | |
| ports: { | |
| http: "8000" | |
| }, | |
| envs: { | |
| // set instances variables | |
| NODE_ENV: "dev", | |
| PATH: "node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", | |
| NODE_PORT: "8000", | |
| PORT: "8000", | |
| NODE_IP: "0.0.0.0" | |
| }, | |
| }, | |
| redis: { | |
| image: { docker: "dockerfile/redis" }, | |
| scalable: false, | |
| ports: { | |
| data: "6379/tcp", | |
| }, | |
| export_envs: { | |
| REDIS_URL: "redis://#{net.host}:#{net.port.data}/#{manifest.dir}" | |
| }, | |
| mounts: { | |
| '/data' : persistent('redis'), | |
| }, | |
| }, | |
| mongodb: { | |
| image: { docker: "dockerfile/mongodb" }, | |
| command: 'mongod --rest --httpinterface', | |
| scalable: false, | |
| ports: { | |
| http: "28017", | |
| }, | |
| http: { | |
| domains: [ "#{manifest.dir}-#{system.name}.#{azk.default_domain}" ], | |
| }, | |
| mounts: { | |
| '/data/db': persistent('mongodb'), | |
| }, | |
| export_envs: { | |
| MONGODB_URI: "mongodb://#{net.host}:#{net.port[27017]}/umrum_development", | |
| }, | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment