Skip to content

Instantly share code, notes, and snippets.

@aussielunix
Created January 15, 2018 02:16
Show Gist options
  • Save aussielunix/7d9bae89a4c49063dbc9bf3d8c041912 to your computer and use it in GitHub Desktop.
Save aussielunix/7d9bae89a4c49063dbc9bf3d8c041912 to your computer and use it in GitHub Desktop.
pws_dns_setup

DNS Setup for deploying to Pivotal Web Services

The following is a simple guide to using a custom domain when deploying to Pivtoal Web Services (PWS or PDUBS)
You will make use of a wildcard dns CNAME for your own domain that points to a cfapps.io URL.

You will need a permananent cfapps.io URL that becomes the basis for your wildcard CNAME entry.
NEVER REMOVE THIS AS THE WILDCARD DNS WILL FAIL

After that any appname/route will work without any dns entries needed.

  • create a name/route on PWS
    • cf push my-example-site
  • create a wilcard CNAME entry pointing to the above - example.cfapps.io

You are now ready to deploy apps to PWS and have routes in your own domain created on the fly.

Example manifest.yml

---

path: public/
memory: 64M
disk_quota: 64M
instances: 2
buildpack: staticfile_buildpack
host: example34
domains:
  - example.com.au
  - cfapps.io

application: my-example-site

This will deploy:

  • everything under public/ to PWS
  • with two instances of the app - load ballanced
  • 64M of RAM allocated
  • 64M of disk space allocated
  • and it will have URLs/routes:
    • example344.cfapps.io
    • example34.exqample.com.au

The app will show up in the PWS portal or cfcli as my-example-site

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment