Created
August 27, 2012 13:04
-
-
Save vitalie/3488255 to your computer and use it in GitHub Desktop.
LuaDNS - Heroku Configuration Example (Lua)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- File: example.com.lua | |
| -- Variable _a is replaced with zone name | |
| -- _a = example.com | |
| -- replace heroku-app-name with application name | |
| heroku_app(_a, "heroku-app-name.herokuapp.com") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function heroku_app(domain, app_name) | |
| -- Create CNAME for www | |
| cname(concat("www", domain), app_name) | |
| -- Usage of A records for naked domains is highly discouraged | |
| -- here we are using A records only for redirection | |
| -- mydomain.com will be redirected to www.mydomain.com | |
| -- using "rack-canonical-host" or other method | |
| a(domain, "75.101.163.44") | |
| a(domain, "75.101.145.87") | |
| a(domain, "174.129.212.2") | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment