diff --git a/README.md b/README.md index 8229bb8..57fbd3a 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ pairing with smart people at Hashrocket. For a steady stream of TILs, [sign up for my newsletter](https://crafty-builder-6996.ck.page/e169c61186). -_1571 TILs and counting..._ +_1572 TILs and counting..._ See some of the other learning resources I work on: - [Ruby Operator Lookup](https://www.visualmode.dev/ruby-operators) @@ -206,6 +206,7 @@ See some of the other learning resources I work on: - [Reload The nginx Configuration](devops/reload-the-nginx-configuration.md) - [Resolve The Public IP Of A URL](devops/resolve-the-public-ip-of-a-url.md) - [Running Out Of inode Space](devops/running-out-of-inode-space.md) +- [Set Up Domain For Hatchbox Rails App](devops/set-up-domain-for-hatchbox-rails-app.md) - [SSH Into A Docker Container](devops/ssh-into-a-docker-container.md) - [SSL Certificates Can Cover Multiple Domains](devops/ssl-certificates-can-cover-multiple-domains.md) - [Wipe A Heroku Postgres Database](devops/wipe-a-heroku-postgres-database.md) diff --git a/devops/set-up-domain-for-hatchbox-rails-app.md b/devops/set-up-domain-for-hatchbox-rails-app.md new file mode 100644 index 0000000..d50949a --- /dev/null +++ b/devops/set-up-domain-for-hatchbox-rails-app.md @@ -0,0 +1,24 @@ +# Set Up Domain For Hatchbox Rails App + +When we deploy a Rails app with [Hatchbox](https://hatchbox.io), we are given +an internal URL for publicly accessing our app. It is something like +`https://123abc.hatchboxapp.com`. That's useful as we are getting things up and +running, but eventually we want to point our own domain at the app. + +The first step is to tell Hatchbox what domain we are going to use. + +From our app's _Domain & SSL_ page we can enter a domain into the _Add A +Domain_ input. For instance, I have the +[visualmode.dev](https://visualmode.dev) domain and I want the +[still.visualmode.dev](https://still.visualmode.dev) subdomain pointing at my +Rails app. I submit the full name `still.visualmode.dev` and I get an _A +Record_ ipv4 address (e.g. `23.12.234.82`). + +The second step is to configure a DNS record with our domain registrar. + +From the DNS settings of our registrar (e.g. Cloudflare) we can add an _A +Record_ where we specify the name (e.g. `still`) and then include the ipv4 +address provided by Hatchbox. We can save this and wait a minute for it to +propagate. + +And soon enough we can visit our Rails app at the custom domain.