Output of a IBM Cloud Code Engine app |
Options for apps with custom domain
To wrap a custom domain or domain alias around your IBM Cloud Code Engine app, there exist some options - more than I will list here. Basically, it is to deploy a reverse proxy or load balancer and point a DNS record to it. Typically for my deployments I have the apps on a subdomain and just use CNAME entries to point to them.
- Code Engine has documentation on deploying an app across multiple regions with a custom domain name. Having your app only in a single region with a custom name is straight forward, right? The solution is based on the IBM Cloud Internet Services (CIS) which is powered by Cloudflare.
- Another option is to directly go with Cloudflare. This blog post discusses how to configure a custom domain for your Code Engine app using Cloudflare with Edge Functions. It requires you to have Cloudflare handle all or some DNS entries, depending on the service plan.
- For some of my apps I have deployed traefik proxy. You can run it in a Kubernetes cluster or even in Cloud Foundry. I share the instructions and sample configuration files a deployment in this GitHub repository. It makes use of the built-in domain management and lets traefik perform the proxying and TLS management. The screenshot below shows this sample migration app served on a custom domain.
IBM Cloud Code Engine app with custom domain |
There are many more options. As mentioned, right now it takes a reverse proxy / load balancer in front of the Code Engine app to configure a custom domain. I am eager to have such a feature supported by Code Engine directly.
If you have feedback, suggestions, or questions about this post, please reach out to me on Twitter (@data_henrik) or LinkedIn.