-
Notifications
You must be signed in to change notification settings - Fork 371
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Package with Docker #145
Package with Docker #145
Conversation
make stdout always unbuffered (so docker logs are visible) and set PUBLIC_DIR in case of production too
ruby:2.6 is the latest work version of ruby without errors |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all good
Hello @mildsunrise |
I think this PR already has many changes as-is... to avoid complicating it further, I'd suggest you start a separate PR based on my branch, and add docker-compose.yml there :) |
Will do, thanks Alba :) |
is there anything missing to move this pr? i'd like to use it :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for this. A bunch of folks will be happy to see this merged.
I had the one question re: loading the config file, but I'm going to go ahead and merge right away. I'm going to think about this change some more and I may save for a follow-on release so we can get the Docker config out the door.
Nice work!
@@ -135,7 +136,7 @@ module Config | |||
attr_reader :env, :base, :bootstrap | |||
def load path=self.path | |||
raise ArgumentError, "Bad path (#{path})" unless File.readable?(path) | |||
YAML.load_file path | |||
YAML.load(ERB.new(File.read(path)).result) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. This allows the config file to be interpolated. Could you add a comment with a usage example?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I uncollapsed the config changes and see the obvious usecase 😹. All good
Thank you! I see the config file question is resolved. Btw, I just noticed a typo in the help comments:
Redis networks -> Docker networks |
bump :) |
@isAAAc Sure, why not? |
This PR adds
.dockerignore
andDockerfile
to allow it to be deployed with Docker. The Dockerfile contains instructions & examples of use.This Dockerfile contains many improvements with respect to #110, see #110 (comment).
To allow the application to run correctly under docker, some extra changes have been made:
config.ru
: Set stdout to be always unbuffered (so logs appear immediately). This is useful for both Docker and other environments.config.ru
: SetPUBLIC_DIR
in production environment too, otherwisepublic
files are not served.If you don't like those changes, tell me and I'll find a workaround.