Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When deploying on fly, server PORT is set to 8080 instead of 3000? #2398

Open
Martinsos opened this issue Dec 4, 2024 · 4 comments
Open
Assignees
Labels
bug Something isn't working deployment

Comments

@Martinsos
Copy link
Member

We had two users encounter this situation. It is not clear how that happened -> they used wasp deploy fly deploy and that should have set PORT to 3000, not 8080. We should investigate to figure out what could be causing this.

One noticable thing is that on the first deploy one of the users forgot some other env vars, so they redeployed a couple of times till they got them all set correctly. Might it be that in this process, PORT somehow got messed up? Or it was never set to 3000?

Related discord convo: https://discord.com/channels/686873244791210014/1313215934844113000/1313215934844113000 .

@Martinsos Martinsos added bug Something isn't working deployment labels Dec 4, 2024
@vincanger
Copy link
Contributor

This just happened to me as well:

  1. Ran wasp deploy fly launch cursor-template ams --org wasp
  2. Encountered the following error:
$ flyctl postgres create --name cursor-template-db --region ams --vm-size shared-cpu-1x --initial-cluster-size 1 --volume-size 1 --org wasp
/bin/bash: flyctl: command not found
🚀  There was an error running "wasp deploy fly create-db <region>". Please review the error and try again (if appropriate). 
  1. Ran wasp deploy fly create-db ams and encountered error that I forgot to add the org slug so
  2. Ran wasp deploy fly create-db ams --org wasp && wasp deploy fly deploy --org wasp
  3. Checked port and it was set to 8080 so I changed it to 3000 and it worked and is now live at https://cursor-template-client.fly.dev/

@Martinsos
Copy link
Member Author

Hm ok we certainly have to look into this then! Btw what do you think caused that first error, any ideas? Ok so you ran "launch" -> and that error popped out at which moment? Woudl would it say that command is not found hm. What is your version of flyctl?

@vincanger
Copy link
Contributor

Fly at the time was having an issue so perhaps the db creation and app deployment overall failed because of that? Hard to say.

Not at my laptop now but I believe I’m on the latest flyctl version.

@jturner
Copy link

jturner commented Dec 6, 2024

I also just ran my first wasp deploy fly launch ptcgp-friends ord for my app and had the same issue where the server was running on 8080 but fly.io wanted it on 3000. I ran wasp deploy fly cmd secrets set PORT=3000 --context=server to fix this.

Otherwise I encountered no other errors when running the launch command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working deployment
Projects
None yet
Development

No branches or pull requests

4 participants