Notes and anecdotes

Techstuff rambling

Custom Slack slash commands (on Heroku)

Imagine writing “/info web” in your Slack and receiving latency, percentage 4xx, 5xx errors from your webserver directly through Slack. Or “/app web” to receive current deployed version and last deploy timestamp. Or “/analytics web” to receive most popular URLs or number of visits. Well that’s perfectly doable!

How to add hubot to slack

Simple notes on how to install hubot and add it to Slack

Django on Heroku with AWS S3 bucket for static and media files

Case: You want efficient collectstatic and serving of files You want static files and media files to be hosted on an AWS S3 bucket. (optional) You have too many files for “normal” collectstatic to be efficient. (optional) You have a non-US S3 bucket. (optional) You use Heroku Disclaimer: Have not tested with python 2.7, can’t…

Continue Reading

Add S3 bucket using Terraform (example)

Edit: I was going to make the s3 bucket with cloudfront, but Terraform has no native support for it, though it looks like it’s coming soon. I’ll probably make a followup later. Edit 2: I made a followup on how to do it with Cloudfront A concrete, developer friendly guide on how to create a proper s3 bucket with…

Continue Reading

Show environment variables in Heroku

I was looking for WEB_CONCURRENCY environment variable on my Django-app. This is used for the number of concurrent webworkers for gunicorn, and is automatically scaled depending on the memory usage of your app. Do it with the toolbelt, and command heroku run printenv –app your-app-name | grep WEB_CONCURRENCY Read more on optimizing your app here

Django + Heroku bootstrap

It has happened on more than one occasion that I want a new Django project, with Grunt, jQuery, Bootstrap, Font-Awesome etc, deployed on Heroku. So I decided to write down the steps, and made a bash script to automate it all for me.