Deploy support
Hello there, I'm trying to run my Go FIber app on my Server which have Dokploy on it, but most of the time if it starts it either exit without an error or dont even show up and on the client side gives me a bad gateway error. Traefik config seems to look good to me but who knows pls i need some help here lol all my non go stuff works just this has been bugging me out from a long time earlier when i hosted it on Render it worked fine altough i used m custom commands such as go mod download && go run main.go i dont know if dokploy supports custom commands withot any interferance with any kind of buildpacks sooo like am i at the fault here?
Cloud Application Hosting for Developers | Render
Render is a unified cloud to build and run all your apps and websites with free TLS certificates, global CDN, private networks and auto deploys from Git.
66 Replies
Can you share the logs of your application?
@RS also your application is running on port 7070?
yeah seems like so
https://images.topiclist.xyz/users/787241442770419722/rANj9JUm.png this si the only log lol
can you open the select?

and see how many items you have>?
yeah it looks like the containers are recreating when a container is dead
everything looks normal, even the logs are showing the right hostname
hmm let me investigate are you using nixpacks?
can you show the beginning of the last deployment log?
No, its bc i've been switching between different packs to test which it works well in
all of em don't work tho idk why
do you have something configured in advanced -> command?
i had but i've removed it. i added command " go run main.go" but it gave me "/bin/sh: 1: go: not found" lol
that's ok, did you remove it and deploy again?
yep.
that's a simple golang fiber application? I can try to create a simple project with it and see
yeah its simple
well its not quite simple it got many routes but that shouldn't affect any things
yeah seems right, let me create a example to test
hmmm igh
Looks like is running fine
https://github.com/railwayapp-templates/fiber
I used that template is very simple and then assigned a domain
http://youtube-dfghdfgh-534c64-11b99a-5-161-87-31.traefik.me/
GitHub
GitHub - railwayapp-templates/fiber
Contribute to railwayapp-templates/fiber development by creating an account on GitHub.




hmmm let me switch to port 3000
or try to deploy the same application of the repo and see if its working
nooo, you dont need that
probably that was the reason
like when you have a application is not necessary to add a port
when you create a domain you set the port where your application is running
and that should be all you need to do
did you redeploy?
yea
indeed
it exited again :< https://images.topiclist.xyz/users/787241442770419722/MjbEXgzN.png
can you try to deploy the example from the repository?
sure
https://images.topiclist.xyz/users/787241442770419722/q3mjTtXV.png is there a way to use public repo url btw?
yeah
select git
use this as url https://github.com/railwayapp-templates/fiber.git
GitHub
GitHub - railwayapp-templates/fiber
Contribute to railwayapp-templates/fiber development by creating an account on GitHub.
and branch as main
and save and deploy
hmmm, interesting so probably is something with the application itself, looks like in the repo is using the v2.42.0 of fiber and you v2.48.0 can you try to downgrade to see ?
hmmm
downgrading huh
i dont think that will work bc most of pkg i use
dosen't wsupport 18 or lower versions
i tried to deploy another one of my projects https://github.com/NetSocialOSS/Harbinger and it exited too lol
GitHub
GitHub - NetSocialOSS/Harbinger
Contribute to NetSocialOSS/Harbinger development by creating an account on GitHub.
let me test it
ight lol
btw @Siumauricio in my codes i use joho's godotenv which well require a .env so when i've deploed Harbinger i got this https://images.topiclist.xyz/users/787241442770419722/XFrDVUvH.png even tho my env is configed
yeah that thing is in your code you need explicity the presence of the .env file
https://github.com/NetSocialOSS/Harbinger.git
GitHub
GitHub - NetSocialOSS/Harbinger
Contribute to NetSocialOSS/Harbinger development by creating an account on GitHub.
and we inject the enviroment variables to the container
so we don't create any file to your project
let me fork it and see
ight
:)
yeah
i used render for good chuck of my time they create a ,env in ur stuff
actually that could be a good idea, we just inject the container variables and nothing else, but we could create a file with the .env in the directory
yeah.
I found the issue @RS

Wow how did you got it running
you had this line of code
Oh
that cause to create multiples proceses inside the container and that makes to exited
Ohhhh
I se3
probably in render this did not happen to you because internally they handle a limit but as here your machine gives you all the resources that's why you get the error.
Yeah
What about the env thing
The only solution I could give you is to create an .env in your repository, because in your code you have validated that if or if you read a .env file
or let me try something
maybe with the mounts you can achieve this
let's goooo
what you can do is to create a
File mount
and then specify the enviroment variables and when you deploy it automatically will create a folder called files
with the file you've specified, and then in your code read the .env file to be inside the files/.env


Ooo
Let me try that
How to make a file mount btw
in the advanced, then scroll down
Ah ight
I thought I had already fixed it lol
Lol
Ight man thanks for helping I greatly appreciate that
There is just one more thingy lol @Siumauricio ;-;


same application?
Nah now it's Harbinger
@Siumauricio yo?