Closed SangeetAgarwal closed 1 year ago
I suggest reaching out on https://community.fly.io because they can often look at your app and give you ideas of what could be wrong. Sorry you're having so much trouble!
I also came across this problem today and found the reason. The dockerfile specifies port 8081 as the default (ENV PORT="8081"
) but the fly.toml file specifies port 3000 as the default internal_port
(at least that was the case for my project I just created today). This mismatch seems to be the reason. After changing the internal_port
in fly.toml to 8081
it worked for me.
So it does seem to be a problem with the epic stack template?
The template configures this correctly: https://github.com/epicweb-dev/epic-stack/blob/main/fly.toml#L19
Strange, it was wrong for me. That being said, 8080
is defined as INTERNAL_PORT
in the Dockerfile, which I can only find being used in litefs.yml
, while the servers index.ts
seems to use the PORT
variable, which is defined as 8081
:
https://github.com/epicweb-dev/epic-stack/blob/a55ca78909007099c2cdab073377fc74e262753b/server/index.ts#L137
https://github.com/epicweb-dev/epic-stack/blob/a55ca78909007099c2cdab073377fc74e262753b/other/Dockerfile#L53
So I still think there is a mistake or am I missing something else? I had to make sure that both PORT
in Dockerfile
and internal_port
in fly.toml
are the same for it to work, which they don't seem to be right now.
The current setup is correct (it's used exactly this way to deploy the template app to https://www.epicstack.dev).
LiteFS runs a proxy server on 8080 and proxies all requests to 8081 which is where our app runs.
The 3000 is the fallback and is only used for local development.
I'm attempting to deploy an app source code. This has no database access whatsoever so my new
Dockerfile
looks like so. I haven't changed any of the defaults except for nuking all the dB related stuff.I had successfully deployed an indie stack version [source ] earlier and all I'm attempting to do is deploy an epic stack version.
fly.toml
is as followsWhen I do
fly logs
then the o/p where it fails is as followsI have been struggling with this for 24 hours or so, if someone could take a quick look & let me know what I might be missing.