dwyl/app

Deploy `Flutter` App to Fly.io

nelsonic opened this issue Β· 22 comments

On it πŸ‘

Cool. Thanks @LuchoTurtle. Going to do my part on CloudFlare now.

Turns out I need an IPV4 Address in order to configure the subdomain:

image

So can only do this once the initial deployment to Fly.io is complete.
@LuchoTurtle ping me on Signal when you've got the basic Flutter App deployed. πŸ‘Œ

@nelsonic Already made the changes in #313 . It is already deployed (check https://fly.io/dashboard/dwyl-app) so you can proceed with Cloudflare.

Get IP v4 Address from Fly.io App info: https://fly.io/apps/dwylapp
image

66.241.125.55

Add to DNS config on Cloudflare:
image

Wait patiently while the DNS records update ... ⏳

https://app.dwyl.com/
image

What part of "patiently" didn't you understand...? 😜
(come back to this in a few hours once the DNS record has propagated ...)
OR update DNS on Mac to point to 1.1.1.1 ...

image

Still have to be patient ... 🧘

We should review this together on Standup today.

Just ran:

 fly ips allocate-v4 --app dwylapp

as per: https://fly.io/docs/reference/services/

And got the following:

VERSION	IP             	TYPE  	REGION	CREATED AT 
v4     	149.248.196.139	public	global	8s ago    

Now instead of having a shared IP v4 address, we have:
https://fly.io/apps/dwylapp
image

149.248.196.139 (not shared)

Updated the IP address on Cloudflare:

image

Getting the following (different) error when visiting: https://app.dwyl.com/
image

Ok. might need to be patient with this again. ⏳

This error is quite strange:

This page isn’t working app.dwyl.com redirected you too many times.
[Try clearing your cookies](https://support.google.com/chrome?p=rl_error&hl=en-GB).
ERR_TOO_MANY_REDIRECTS

@LuchoTurtle / @SimonLab would you mind researching this πŸ” πŸ™
or if one of you wants to figure out why the App isn't working on the subdomain (I can help if needed)
then the other person can look into page load times: #315

Could it be that the Flutter app doesn't acknowledge the app.dwyl.com as a possible redirect? πŸ’­

On @LuchoTurtle's advice:
Changed:
image

image

Updated:
image

Sadly, we get: "SSL handshake failed":
image

And it also fails for the auth instance that was working: https://auth.dwyl.com/
image

Lots of people have this problem in Cloudflare forums and all the links I could find are usually SSL/TLS-related or HTTP/HTTPS-related.
Cloudflare Docs even has a troubleshooting section for this.

https://developers.cloudflare.com/ssl/troubleshooting/too-many-redirects/

If the Cloudflare configuration is the same as auth's, there must be something on fly's side that is not.

Yeah, the first thing I checked was the two apps we have on Fly.io that have Cloudflare A records:
https://auth.dwyl.com and https://hits.dwyl.com
Both of these are Phoenix Apps. So it's possible that the config for the Flutter app is just not quite right.
Hence me suggesting that we need to ask a question on the https://community.fly.io
with as much context as possible.

If you search on https://community.fly.io for "Flutter" the only match is: https://community.fly.io/t/postgres-write-broken-pipe/5529
image

This is not relevant to us. so we need to open a new question. That will be helpful to anyone else trying to deploy a Flutter Web App to Fly.io. πŸ™

@LuchoTurtle please update your question with screenshots without obfuscating the IP addresses:
image

None of this is private or sensitive info. it's all public by virtue of the fact that DNS is public. 🌎
So scrubbing the IP address just makes you/us look like we have no idea what we're doing. πŸ™ƒ

image

e.g: https://www.whatsmydns.net/dns-lookup?query=dwyl.com&server=cloudflare

Done

Not closed. Additional checkboxes / todos added to OP. ⏳

Dedicated issue for this DNS saga: #316

Closing this issue because #316 has also been addressed.