-
Notifications
You must be signed in to change notification settings - Fork 0
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
WEB-6755: Gem updates #238
Merged
+127
−88
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
e52f375
WEB-6755: Upgrading to ruby 3.3
sammyd dcb39bd
WEB-6755: Upgrading gems
sammyd 91c362f
WEB-6755: Upgrading bundler
sammyd b6447f6
WEB-6755: Rubocop fixes
sammyd f575ea6
WEB-6755: Making it multi-stage build docker file
sammyd 516d081
WEB-6755: Have to lock commonmarker to get it to work on musl
sammyd 62d55f3
WEB-6755: There is better checking now...
sammyd db591df
WEB-6755: Adding a comment explaining the pinning
sammyd 1dfca5a
WEB-6755: Missed dropping some places back to ruby 3.2
sammyd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,7 @@ | ||
FROM ruby:3.2-alpine | ||
LABEL [email protected] | ||
ARG RUBY_ENV | ||
|
||
LABEL com.github.actions.name="robles" | ||
LABEL com.github.actions.author="Kodeco <[email protected]>" | ||
LABEL com.github.actions.description="Content publication for kodeco.com" | ||
LABEL com.github.actions.color="purple" | ||
LABEL com.github.actions.icon="book" | ||
FROM ruby:3.2-alpine AS builder | ||
LABEL [email protected] | ||
|
||
ARG APP_ROOT=/app/robles | ||
ARG BUILD_PACKAGES="build-base git" | ||
|
@@ -41,3 +37,52 @@ RUN bundle install --jobs 20 --retry 5 | |
|
||
# Copy the main application. | ||
COPY . ./ | ||
|
||
# Remove extra files | ||
RUN rm -rf /usr/local/bundle/cache/* | ||
|
||
|
||
############################## | ||
# PACKAGE STAGE # | ||
############################## | ||
FROM ruby:3.2-alpine | ||
LABEL [email protected] | ||
LABEL com.github.actions.name="robles" | ||
LABEL com.github.actions.author="Kodeco <[email protected]>" | ||
LABEL com.github.actions.description="Content publication for kodeco.com" | ||
LABEL com.github.actions.color="purple" | ||
LABEL com.github.actions.icon="book" | ||
|
||
ARG APP_ROOT=/app/robles | ||
ARG RUBY_ENV=${RUBY_ENV:-production} | ||
|
||
ENV RUBY_ENV=${RUBY_ENV} | ||
|
||
ARG RUNTIME_PACKAGES="imagemagick git tzdata" | ||
ARG TEST_AND_DEV_PACKAGES="bash build-base libsodium-dev" | ||
|
||
# SYSLOG TO STDOUT | ||
RUN \ | ||
touch /var/log/syslog && \ | ||
ln -sf /proc/1/fd/1 /var/log/syslog | ||
|
||
# libsodium | ||
COPY --from=builder /usr/lib/libsodium.so* /usr/lib/ | ||
# Copy the app from builder | ||
COPY --from=builder $APP_ROOT $APP_ROOT | ||
COPY --from=builder /usr/local/bundle /usr/local/bundle | ||
|
||
# Set the working directory | ||
WORKDIR $APP_ROOT | ||
|
||
# For runtime | ||
RUN apk update \ | ||
&& apk upgrade \ | ||
&& apk add --update --no-cache $RUNTIME_PACKAGES \ | ||
&& rm -rf /var/cache/apk/* | ||
|
||
# Test and dev packages | ||
RUN if [ "$RUBY_ENV" == "test" -o "$RUBY_ENV" == "development" ]; then \ | ||
apk add --update --no-cache $TEST_AND_DEV_PACKAGES \ | ||
&& rm -rf /var/cache/apk/*; \ | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,20 +55,6 @@ def slides | |
snapshotter.generate | ||
end | ||
|
||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this works? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it should work... |
||
desc 'serve', 'starts local preview server' | ||
option :dev, type: :boolean, desc: 'Run in development mode (watch robles files, not module files)' | ||
def serve | ||
fork do | ||
if options[:dev] | ||
Guard.start(no_interactions: true) | ||
else | ||
Guard.start(guardfile_contents: content_module_guardfile, watchdir: './', no_interactions: true) | ||
end | ||
end | ||
RoblesContentModuleServer.run! | ||
end | ||
|
||
desc 'secrets [REPO]', 'configures a module repo with the necessary secrets' | ||
long_desc <<-LONGDESC | ||
`robles module secrets [REPO]` will upload the secrets requires to run robles on a | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Maybe we don't need
libsodium-dev
here as we are already copyinglibsodium
from builder below.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 wasn't sure whether it might also need header files or something else that might be part of the package when building a new version of the gem? Since this was only for test and development I thought it could probably stay in.