Golang app: build failed
Hi, everyone
Its my first time attemping to deploy to railwayapp and i dont understand why my golang project fails to build.
Appreciate any help! 🙂
project: https://github.com/nikita-shtimenko/snippetbox-api
GitHub
GitHub - nikita-shtimenko/snippetbox-api
Contribute to nikita-shtimenko/snippetbox-api development by creating an account on GitHub.
Solution:Jump to solution
1. remove the
server
binary from your repo
2. make sure the server
binary is being gitignored
3. in the service settings set the build command to go build ./...
4. in the service settings set the start command to ./server
...15 Replies
Project ID:
9d103b90-f62d-425c-b77c-91c33b0e602f,9d103b90-f62d-425c-b77c-91c33b0e602f,9d103b90-f62d-425c-b77c-91c33b0e602f,9d103b90-f62d-425c-b77c-91c33b0e602f
"no Go files in /app", did you specify the main directory?
Heh, no... Where can i do? In the dashboard of the project?
now im getting another errors
<:mommy_whatthe:970691006557212672>
nah, in your dockercompose file I think
what's your file structure
no docker mate >_<
Sorry I'm tired 😭
GitHub
GitHub - nikita-shtimenko/snippetbox-api
Contribute to nikita-shtimenko/snippetbox-api development by creating an account on GitHub.
yea I have no idea, seems fine to me
same 😦
you have your main file in a slightly unorthodox location, most people have their main files in the root of the project, either way, follow these instructions
Solution
1. remove the
server
binary from your repo
2. make sure the server
binary is being gitignored
3. in the service settings set the build command to go build ./...
4. in the service settings set the start command to ./server
i will try it right now, thanks!
It worked! Thank you, appreciate your help and time spent! ❤️
no problem