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
- Sign up for Convox, Install a Rack and Convox CLI.
- In your botmetrics directory issue the following commands:
convox apps create
to create an application called botmetrics convox services create postgres && convox services create redis
this will provision a Postgres and Redis Service on AWS (Go get a coffee.)- Once convox has finished creating the app you can start you first deploy with
convox deploy
- Set the environment variables for Redis and Postgres
convox services
will list the names of the postgres and redis service instances.convox service info <service name>
will provide the URL for each service.- Use
convox env set REDIS_URL=<url_from_redis_service>
andconvox env set DATABASE_URL=<url_from_redis_service>
- Note the final release ID
- After convox deploy from step 5 has finished promote the release with the ENV variables with
convox releases promote <release_id>
- Setup your database for the first time with
convox run web rake db:structure:load db:seed
- Get the public URL for your app with
convox apps info
it's the one that's onport 80
- Browse to the URL and Enjoy!
Updating your AWS Installation
- Run
git pull --rebase origin master
from your local repository of Botmetrics - Run
convox deploy
- Promote the latest release with the release ID obtained from the previous
convox deploy
command and runconvox release promote <release-id>
- Run
convox run web rake db:migrate
to update your database schema
Updated less than a minute ago