Deploy to a fresh DO droplet with actual url as host

On a fresh droplet I can deploy with the ip address set in my hosts production file no problem. However, I figured let me just skip the ip and use the actual url. As a result I am getting an error prior to the provision starting stating that it can’t connect to the host via ssh.

All keys were added to the droplet prior. I have had no issues deploying to ip addresses in the past, nor to actual urls on servers that have already been provisioned.

Am I able to deploy to a fresh server using just the actual url as the hostname? Or do I need to first use the ip address? Sorry for my lack of understanding and thanks.

It’s possible your DNS changes have not yet propagated, but without knowing the full text of the error you receive the best anyone can do is guess.

1 Like

In order to deploy to the domain I first had to set my production host and site_host vars in trellis to just the ip address. Afterwords I needed to change just the site_host to the domain. Once I did that I was able to ssh directly to the domain without any problems and subsequently replace all “ip addresses” with my actual domain. Is this normal or is there a way to deploy directly to the domain from the get go? As a side note my DNS is being handled off of digital ocean which could be a reason.

Entirely possible, probable even, that I may be missing something, but that’s the only way I’ve deployed - directly to the domain, on a fresh droplet, from the jump.

I’ll start by changing the name servers (domains on NameCheap) to point at DO, then I’ll go over to DO and create a droplet, setup the domain stuff there, A records & MX records, etc.

Then I’ll go through Trellis and get my deployment setup and ready to go. By the time I’ve finished setting up the domain has propagated (NameCHeap is pretty quick).

Then I ping the url and make sure I’m getting the right IP back, ssh once just to be sure, then run my deployment. No issues.

1 Like