diff --git a/.hookshot.conf b/.hookshot.conf new file mode 100644 index 0000000..4fc2f64 --- /dev/null +++ b/.hookshot.conf @@ -0,0 +1,11 @@ +[default] +method = "ansible" + +# We don't currently have a staging server +# [branch.master] +# playbook = "deploy/ansible/deploy.yml" +# inventory = "deploy/ansible/inventory/staging" + +[tag."prod-*"] +playbook = "deploy/ansible/deploy.yml" +inventory = "deploy/ansible/inventory/production" diff --git a/README.md b/README.md index 532fc90..f21917b 100644 --- a/README.md +++ b/README.md @@ -76,48 +76,14 @@ In development, set the `TEST_CELERY_URL`, `TEST_CELERY_TOKEN`, and `TEST_CELERY ##Deployment -### This section is currently out of date as we migrate to other hosting +### Automated Deployment -###Server -This document does says it best [Heroku git deploy](https://devcenter.heroku.com/articles/git) +A Bocoup run [Hookshot](https://github.com/brianloveswords/hookshot) instance is configured to deploy commits taged with `prod-xxx` to production. Where `xxx` is an incrementing version number. You can see the results of a deploy in the [webhook response tab](https://github.com/tessel/tessel.io/settings/hooks/6699959#delivery-response) of this repo. -First you must be sure to have [heroku toolbelt](https://toolbelt.heroku.com/) installed. +### AWS -Make sure that you have these remotes to your local git clone (yes, these are legacy URLs). +### Ansible -``` -git remote add heroku https://git.heroku.com/technical-io.git -git remote add stage https://git.heroku.com/technical-io-stage.git -``` - -Login to heroku using the Mitro credentials for heroku - -``` -heroku login -``` - -**We only ever deploy the master branch to the production server.** -To deploy to production: -``` -git push heroku master -``` - -To deploy to stage: -``` -git push stage [branch-name]:master -``` - -And that's it, Heroku is awesome. (except when it doesn't put node in the environment path) - -**Be sure the environment variables are set on the server.** - -Specifically these and everything in .env.example - -``` -PATH = bin:node_modules/.bin:/usr/local/bin:/usr/bin:/bin -NODE_ENV = production -NPM_CONFIG_PRODUCTION = false -``` ### Images and Scripts Be sure to install the AWS cli