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