Looks like your app is listening on 127.0.0.1. You may need to listen on 0.0.0.0 instead.
I'm getting this error message when I try to build my project. Is there a simple thing I can add to my Dockerfile to make this fix?
11 Replies
Share your Dockerfile.
GitHub
octobox-docker/Dockerfile at master · kiarafbickers/octobox-docker
📮Untangle your GitHub Notifications. Contribute to kiarafbickers/octobox-docker development by creating an account on GitHub.
i dont know rails but does
RUN RAILS_ENV=development
make it listen on localhost? It should be running in prod mode ( whatever that means in rails land )And what's the error message?
That it's running on localhost I asume
Yep, this is an issue with your code, not Docker
I asked the devs of the project, and they suggested that I add
RAILS_ENV=development
as an environment variable in Railway, but that seems to produce it's own error. https://github.com/octobox/octobox/issues/3145GitHub
Run Production from Dockerfile, not Docker Compose? · Issue #3145 ·...
Are you experiencing this issue in octobox.io or your own instance? My instance If your issue is related to an Octobox.io subscription purchase please ensure you have installed the Octobox GitHub A...
I'm using this as the start command,
RAILS_ENV=production bundle exec puma -C config/puma.rb
Looks like it's getting closer... https://web-production-644b.up.railway.app/
I changed the build command to this, bundle exec puma -C config/puma.rb
and added the environment variable to RAILS_ENV=development
.Have your tied letting nixpacks do its thing? Ie not setting any start commands.
https://nixpacks.com/docs/providers/ruby
Might help, I can see some of the words in your command are on that page.
Otherwise you can try creating a dockerfile for your project. Altho nixpacks >>>> dockerfile
Ruby | Nixpacks
App source + Nix packages + Docker = Image
Yeah, I removed my custom start commands and it's building now. Last hurdle is to fix the blocked host error message I'm getting without breaking the successful build. https://web-production-644b.up.railway.app/
Looks like you just need to run a dB migration of some kind?