README
READ ME
Introduction
This package includes: convox-js2yaml which convert convox.js to convox.yml convox-deploy-and-migrate-rails: which build a rails app, then attempt to run migration before promoting the release
Example convox.js
const base = {
build: ".",
environment: ["*"],
scale: {
memory: 1024,
cpu: 512,
},
};
const web = {
...base,
port: 3000,
health: {
path: "/ip",
grace: 60,
interval: 60,
timeout: 5,
},
};
const isStagingCluster = process.env.ENV == "staging";
const none = process.env.ENV == "none";
let cluster;
if (none) {
cluster = { services: {} };
} else {
cluster = {
services: {
"admin-web": {
...web,
scale: {
count: isStagingCluster ? 1 : 4,
memory: 1024,
cpu: 256,
},
command: "bundle exec thin start -p 3000",
}
},
};
}
module.exports = cluster;