Using Hummingbird with Docker #70
sanvean
started this conversation in
Show and tell
Replies: 1 comment
-
@sanvean Yes this is a good point. I have also released a template repository which includes a basic template for a Hummingbird project. This includes a Dockerfile that defaults to using |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Just a little tip for anyone looking deploy something with Hummingbird using Docker.
Use "0.0.0.0" as your hostname and not "127.0.0.1" or localhost as well as adding port forwarding.
e.g.
let app = HBApplication(configuration: .init(address: .hostname("0.0.0.0", port: 8080)))
Docker Container
-p 8080:8080
Docker Compose
ports:
- '8080:8080'
Otherwise you'll get a connection refused error when trying to reach your HB routes even though Hummingbird looks like it's running nicely in your container.
p.s. Thanks for the great library @adam-fowler, exactly what we were looking for to add on some simple web based functionality to an existing Swift server component.
Beta Was this translation helpful? Give feedback.
All reactions