Skip to content
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

Add Ruby/Rack application example with hot reload #3515

Merged
merged 5 commits into from
Jan 17, 2020

Conversation

dsalahutdinov
Copy link
Contributor

Description

Adds sample Ruby/Rack application with hot reload demonstration

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@dsalahutdinov
Copy link
Contributor Author

@googlebot I signed it!

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@codecov
Copy link

codecov bot commented Jan 16, 2020

Codecov Report

Merging #3515 into master will not change coverage.
The diff coverage is n/a.

@dgageot dgageot self-assigned this Jan 16, 2020
@dgageot dgageot added the kokoro:run runs the kokoro jobs on a PR label Jan 16, 2020
@kokoro-team kokoro-team removed the kokoro:run runs the kokoro jobs on a PR label Jan 16, 2020
FROM ruby:2.7

WORKDIR /app
COPY . .
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we do something like:

  • Copy Gemfile*
  • Download the dependencies
  • Copy the rest of the sources

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, @dgageot , thanks for review!
It's done.

Copy link
Contributor

@dgageot dgageot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, with a few more nits.
Also, can you copy the whole integration/examples/ruby to examples/ruby.

FROM ruby:2.7

WORKDIR /app
ADD Gemfile* /app/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: ADD Gemfile* ./

ADD Gemfile* /app/
RUN bundle install

ADD . /app/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: ADD . ./

artifacts:
- image: ruby-example
context: backend
sync:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you tried?

sync:
  infer:
  - *.rb

It would be nice to demonstrate inferred sync

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, I've changed to rack unreloader config and skaffold's option to infer. Works well

@dsalahutdinov
Copy link
Contributor Author

It's done!

@dgageot dgageot added kokoro:run runs the kokoro jobs on a PR and removed pr/changes-requested labels Jan 17, 2020
@kokoro-team kokoro-team removed the kokoro:run runs the kokoro jobs on a PR label Jan 17, 2020
@dgageot dgageot merged commit 448b193 into GoogleContainerTools:master Jan 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants