Botmetrics

The Botmetrics Developer Hub

Welcome to the Bot Metrics developer hub. You'll find comprehensive guides and documentation to help you start working with Bot Metrics as quickly as possible, as well as support if you get stuck. Let's jump right in!

Production on Amazon Web Services

Deploying Botmetrics to Amazon Web Services with Convox

Deploying Botmetrics to AWS with Convox

Convox is an easy way to deploy dockerized applications to AWS

  1. Sign up for Convox, Install a Rack and Convox CLI.
  2. In your botmetrics directory issue the following commands:
    convox apps create to create an application called botmetrics
  3. convox services create postgres && convox services create redis this will provision a Postgres and Redis Service on AWS (Go get a coffee.)
  4. Once convox has finished creating the app you can start you first deploy with convox deploy
  5. Set the environment variables for Redis and Postgres
    1. convox services will list the names of the postgres and redis service instances.
    2. convox service info <service name> will provide the URL for each service.
    3. Use convox env set REDIS_URL=<url_from_redis_service> and convox env set DATABASE_URL=<url_from_redis_service>
    4. Note the final release ID
  6. After convox deploy from step 5 has finished promote the release with the ENV variables with convox releases promote <release_id>
  7. Setup your database for the first time with convox run web rake db:structure:load db:seed
  8. Get the public URL for your app with convox apps info it's the one that's on port 80
  9. Browse to the URL and Enjoy!

Updating your AWS Installation

  1. Run git pull --rebase origin master from your local repository of Botmetrics
  2. Run convox deploy
  3. Promote the latest release with the release ID obtained from the previous convox deploy command and run convox release promote <release-id>
  4. Run convox run web rake db:migrate to update your database schema