Help stuck, new to docker and everything with VPS

Shouldn't my docker image have a port assigned to it?
No description
30 Replies
oneWhisper
oneWhisperOP4mo ago
I'm trying to upload a Node App, I created the project and the service, the deploy looks good along with the longs everything seems to be connecting just fine. In my environment variables I have the PORT variable set to 3000 but Dokploy is also running on port 3000 on my VPS is that why this is possibly not working. I'm new to all of this I simply want to host my backend on a VPS.
oneWhisper
oneWhisperOP4mo ago
When I go to that URL I get a Bad Gateway error message
No description
oneWhisper
oneWhisperOP4mo ago
I was able to add a server to my dokploy through cloudfare and stuff like that
No description
oneWhisper
oneWhisperOP4mo ago
but im not able to get to my app @Siumauricio if you have some time i would appreciate the help thanks
Siumauricio
Siumauricio4mo ago
don't select https on traefik.me domains....
Siumauricio
Siumauricio4mo ago
we have basic examples that can give a clue what are you doing different https://docs.dokploy.com/docs/core/nextjs
Next.js | Dokploy
Deploy a simple Next.js application.
oneWhisper
oneWhisperOP4mo ago
I had my own domain initially, but I will change that Also any answers to the docker port question?
Siumauricio
Siumauricio4mo ago
It has nothing to do with it, the port 3000 of your application is running internally in the container You can have X amount of applications running on port 3000, as long as you don't expose the port When you specify the port in the domain, traefik will automatically go to that container and look for the internal port
oneWhisper
oneWhisperOP4mo ago
removed the https im getting 404 now.
Siumauricio
Siumauricio4mo ago
check in which port is running your application
oneWhisper
oneWhisperOP4mo ago
No description
Siumauricio
Siumauricio4mo ago
check the logs of your application
oneWhisper
oneWhisperOP4mo ago
looks good
No description
oneWhisper
oneWhisperOP4mo ago
this is how it looks when everything is sucessful
Siumauricio
Siumauricio4mo ago
and what port is running your application?
oneWhisper
oneWhisperOP4mo ago
3000 is what is set on my env variable
Siumauricio
Siumauricio4mo ago
how do you know if you get bad gateway probably you are setting a incorrect port in the domain
Siumauricio
Siumauricio4mo ago
this is a example of nestjs running on port 3000 https://docs.dokploy.com/docs/core/nestjs
Nest.js | Dokploy
Deploy a simple Nest.js application.
oneWhisper
oneWhisperOP4mo ago
i had my env variable in lower case its supposed to be uppercase... lets see if that fixes it the only difference that i see is the build path i have it set to / if i do /nestjs it fails to deploy (making the env variable uppercase didn't fix the issue still getting 404) can i screen share in the voice chat or something? maybe it would be easier?
Siumauricio
Siumauricio4mo ago
No description
Siumauricio
Siumauricio4mo ago
No description
Siumauricio
Siumauricio4mo ago
the example working I suggest to read or compare your application with the example we have
oneWhisper
oneWhisperOP4mo ago
i see what's going on
oneWhisper
oneWhisperOP4mo ago
when i go to this url it automatically puts the https in the url bar
No description
Siumauricio
Siumauricio4mo ago
thats the cache
oneWhisper
oneWhisperOP4mo ago
but the https page doesn't exist im actually mad at myself now, thank you for the attention cool stuff you got going on here!
Siumauricio
Siumauricio4mo ago
yeah that's why I said you don't need to assign https to traefik.me domains hahaha nice you get it working!
oneWhisper
oneWhisperOP4mo ago
first time ever using a vps, ssh into a vps or anything to do with that so sorry for all of this so i could go to cloudfare and like my server I can add a dns rercord right?
Siumauricio
Siumauricio4mo ago
no worries yeah

Did you find this page helpful?