Newbie question: how do I access my website?

Hello,
I just launched and deployed my Rails app. Neither .fly.dev nor the shared IPv4 are getting me to my site. Also on deploy, it said:

The app is not listening on the expected address and will not be reachable by fly-proxy.
You can fix this by configuring your app to listen on the following addresses:
  - 0.0.0.0:3000
Found these processes inside the machine with open listening sockets:
  PROCESS                                 | ADDRESSES
------------------------------------------*----------------------------------------
  /.fly/hallpass                          | [fdaa:17:37db:a7b:3d9:aa71:822c:2]:22
  puma 6.4.2 (tcp://0.0.0.0:8080) [rails] | 0.0.0.0:8080

My fly.toml:

app = 'myfirstgameapp'
primary_region = 'fra'
console_command = '/rails/bin/rails console'

[build]

[http_service]
  internal_port = 3000
  force_https = true
  auto_stop_machines = 'stop'
  auto_start_machines = true
  min_machines_running = 0
  processes = ['app']

[[vm]]
  memory = '512mb'
  cpu_kind = 'shared'
  cpus = 1

Help? I don’t see this explained anywhere, I guess I’m clueless.

The first thing is that you’ve declared your internal port to Fly as 3000, but your app is listening on 8080. Change one of them so they’re the same.

The error tells you what to do:

You can fix this by configuring your app to listen on the following addresses

Although you can change either end, it doesn’t matter which.

@halfer Ok so it turns out it resets my port to 3000 after each launch even if I instruct it to copy the existing configuration. Any ideas why? Can I just change this later and force it to use it anyway?

What commands are you issuing for it to amend your TOML file? It should not do that; you should only need a flyctl deploy command.

@halfer I see, well, after the launch command it rewrites my TOML, but after I edited it and deployed, it worked. I can use my appname.fly.dev link, and it opens my app. It still doesn’t work on IPv4 tho but I think thats ok. I’m still confused as to where I actually feed it my config then, not at launch?..

I think flyctl launch you do once to create the TOML config file. I personally don’t like it, as I think the file is best constructed by hand. It feels like a kindness for Fly to provide this, as it gets more people running more quickly, but it is at the cost of making the platform more confusing.

You should do a flyctl deploy every time you want to update your app. The problem here is that you’re doing a one-time step repeatedly.

1 Like

Post the latest set of logs and we can take a look. In general it is just that your app needs to listen on IPv6 not IPv4.