I have two applications (using myapp for anonymity), because one is a node server for SSR running Next.js, and the other is a Go app Api server. I plan on hosting the former under myapp.com, and the Go app under api.myapp.com.
I wanted to give myapp-web.fly.dev a static IP so that I could point my DNS to it, not realizing that’s not how it works here. Regardless, I ran the following commands:
Verify initial setup:
flyctl ips list --app myapp-web
flyctl ips list --app myapp-api
Both returned a shared IPv4, and an IPv6, as expected.
Then I removed my shared IPv4 for myapp-web and added a static:
flyctl ips release [myapp-web's ipv4]
flyctl ips allocate-v4 --appname myapp --dedicated
flyctl ips list
looked good here. Then I learned that DNS does not require a static IP, so I tried to go back to my former state.
flyctl ips release [dedicated ip]
flyctl ips allocate-v4 --appname myapp-web --shared
Now when I go to myapp-web.fly.dev, it actually shows me myapi-api.fly.dev:
% curl https://myapp-web.fly.dev
{
"msg": "Hello, world!",
"path": "/"
}
and the ip list looks strange (the 0 created at):
% flyctl ips list --app myapp-web
VERSION IP TYPE REGION CREATED AT
v6 2a09:8280:1::4b:4289:0 public (dedicated) global 14h27m ago
v4 66.241.124.134 public (shared) Jan 1 0001 00:00
I’ve tried redeploying, waiting an hour, I can’t seem to get unstuck. What should I do!