aci-compose

· 141 words · 1 minute read
view gist on GitHub

aci-compose 🔗

I learned today that requestb.in had shut down. Their GitHub repo told me I could run it myself & gave me instructions for Heroku.

I thought it would be neat to be able to use a docker-compose file & deploy it to Azure Container Instances. This 20 minutes of hacking gave me something fun

# Create a resource group
az group create -n requestbin -l eastus

# Run aci-compose
# Usage: aci-compose {compose_yaml_path} {resource_group_name} {dns_prefix}
./aci-compose sample.yml requestbin foo | sh

Wait a few moments & you’ll be able to hit your frontend container (foo-app.eastus.azurecontainer.io) in a browser. Hit the button to get a request bin url!

# Try it out with the generated url
http://foo-app.eastus.azurecontainer.io/xhzfajxi

Refresh the page in the browser, you’ll see that your curl request was captured!

# Tear down
az group delete -n requestbin -y --no-wait

main.go

sample.yml