2023-04-03T18:43:46.767453435Z stderr F <i> [webpack-dev-middleware] wait until bundle finished: /adminindex.html
2023-04-03T18:43:33.375312316Z stderr F <i> [webpack-dev-middleware] wait until bundle finished: /adminindex.html
2023-04-03T18:42:33.567421719Z stderr F <i> [webpack-dev-middleware] wait until bundle finished: /adminindex.html
2023-04-03T18:42:33.080706574Z stderr F (Use
node --trace-warnings ...
to show where the warning was created)
2023-04-03T18:42:33.080662098Z stderr F (node:3) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
2023-04-03T18:42:29.674862386Z stdout F [18:42:29] INFO (payload): Payload Admin URL: http://p01--admin-cms--qbt6mytl828m.code.run/admin
2023-04-03T18:42:15.276176582Z stdout F [18:42:15] INFO (payload): Starting Payload...
2023-04-03T18:42:15.275369409Z stdout F [18:42:15] INFO (payload): Connected to Mongo server successfully!
2023-04-03T18:41:40.204364763Z stdout F [2023-04-03T18:41:40Z INFO ] Starting container entrypoint...
2023-04-03T18:41:40.204341075Z stdout F [2023-04-03T18:41:40Z INFO ] Successfully fetched environment variables.
2023-04-03T18:41:40.122563366Z stdout F [2023-04-03T18:41:40Z INFO ] Securely fetching environment variables...
I tried to setup Payload using Northflank following this guide but I can't seem to get the app running. (see error above). Any solutions?
I don't see any errors from the log you posted, are there any errors on your end?
well the page keeps loading and then an error message pops up; upstream connect error or disconnect/reset before headers. retried and the latest reset reason: connection failure, transport failure reason: delayed connect error: 111
Did you specify the same port both in the payload.config.ts, server.ts, Dockerfile as well as the network config in northflank if you're using that?
server.ts is set to listen to port:3000, payload.config.ts is set to process.env.PAYLOAD_URL instead of localhost:3000. Dockerfile--> Expose 3000.
I had to change the ENV for PAYLOAD_URL in Northflank to
http://p01--admin-cms--qbt6mytl828m.code.runinstead of simply "p01--admin-cms--qbt6mytl828m.code.run" because it gave an error otherwise.
oh you sure it's http? Maybe https might work better
and weird that it worked without the http:// for me
But I can imagine payload absolutely rejects anything http it sees in production
https doesn't resolve either..
npm run dev doesn't throw any errors but the link also doesn't open
[nodemon] starting
ts-node src/server.ts
[19:25:44] INFO (payload): Connected to Mongo server successfully!
[19:25:44] INFO (payload): Starting Payload...
[19:25:44] INFO (payload): Payload Admin URL:
https://p01--admin-cms--qbt6mytl828m.code.run/admin(node:11864) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
(Use
node --trace-warnings ...
to show where the warning was created)
webpack built d2489ffbcbeec1938e28 in 728ms
webpack compiled successfully
generally looks right! Can you send a screenshot of your northflank network config?
oh lord
I figured it out
my quick guess: you entered http/2
in your video it was NODE_ENV="PRODUCTION"
nvm!
but the docker file it generates is "production"
gosh.
oh what do you mean? you didnt put it in caps?
yeah or the other way around 🙂
I assumed it would already be
anyhow it works fine now 🙂 thank you for trying to figure this out thou 🙂
huh interesting, didnt think caps mattered!
when the caps hit you
prob better if I add it to the Dockerfile itself, so it becomes optional to enter it manually into your env file
otherwise a great resource tutorial, thanks 🙂
Star
Discord
online
Get help straight from the Payload team with an Enterprise License.