-
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
Issue/54 git workflow #71
Merged
Merged
Changes from 5 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
1b9cb56
epimorphics/hmlr-linked-data#54 adding deployment workflow
fa04c32
git subrepo pull (merge) .github/workflows
063cec3
epimorphics/hmlr-linked-data#54 move gem installation to base in dock…
2f19879
epimorphics/hmlr-linked-data#54 removing unwanted items from dockerig…
2a2fe4a
epimorphics/hmlr-linked-data#54 remove label from dockerfile, add scr…
6d1f7e8
epimorphics/hmlr-linked-data#54 rename URL root env variable
fe8eefd
epimorphics/hmlr-linked-data#54 amend paths in dockerfile to run from…
3b44fdb
Merge branch 'dev-infrastructure' into issue/54-git-workflow
mairead 7902ac8
epimorphics/hmlr-linked-data#54 updating readme with instructions for…
f570ff8
Merge branch 'issue/54-git-workflow' of github.com:epimorphics/lr-lan…
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 |
---|---|---|
|
@@ -2,9 +2,11 @@ | |
.git/ | ||
.github/ | ||
.gitignore | ||
.vs | ||
.vscode | ||
CHANGELOG.md | ||
Dockerfile | ||
Makefile | ||
README.md | ||
deployment.yaml | ||
log/ | ||
log/ |
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 |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
[subrepo] | ||
remote = [email protected]:epimorphics/github-workflows.git | ||
branch = hmlr | ||
commit = fb20a3a81b36a5ae584e22d51f6c228e8c98528d | ||
parent = 2b15d8011b1a293a3acef93fa0881df9b840f25e | ||
commit = a31bc88a431d49edea910171c3d2a53e41c58be0 | ||
parent = 1b9cb562958e89d3383b1fa54e7e94299652ef16 | ||
method = merge | ||
cmdver = 0.4.3 |
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 |
---|---|---|
|
@@ -8,12 +8,12 @@ The workflow should be installed into a applications repository using | |
git-subrepo. See https://github.com/ingydotnet/git-subrepo#installation-instructions. | ||
|
||
|
||
To copy this subrepo into an applicaiton's repository: | ||
To copy this subrepo into an application's repository: | ||
``` | ||
git subrepo clone [email protected]:epimorphics/github-workflows.git .github/workflows -b hmlr | ||
``` | ||
|
||
To update this subrepo in an applicaiton's repository: | ||
To update this subrepo in an application's repository: | ||
``` | ||
git subrepo pull .github/workflows | ||
``` |
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 |
---|---|---|
@@ -1,36 +1,47 @@ | ||
ARG ALPINE_VERSION=3.10 | ||
ARG RUBY_VERSION=2.6.6 | ||
|
||
# Defining ruby version | ||
FROM ruby:$RUBY_VERSION-alpine | ||
# Defines base image which builder and final stage use | ||
FROM ruby:$RUBY_VERSION-alpine$ALPINE_VERSION as base | ||
|
||
# Set working dir and copy app | ||
WORKDIR /usr/src/app | ||
COPY . . | ||
# Change this if Gemfile.lock bundler version changes | ||
ARG BUNDLER_VERSION=2.2.22 | ||
|
||
# Prerequisites for gems install | ||
RUN apk add build-base \ | ||
npm \ | ||
tzdata \ | ||
git | ||
git \ | ||
&& rm -rf /var/cache/apk/* \ | ||
&& gem install bundler:$BUNDLER_VERSION \ | ||
&& bundle config --global frozen 1 | ||
|
||
FROM base as builder | ||
|
||
ARG BUNDLER_VERSION=2.1.4 | ||
RUN apk add --update build-base | ||
|
||
# Install bundler and gems | ||
RUN gem install bundler:$BUNDLER_VERSION | ||
RUN bundle install | ||
# Set working dir and copy app | ||
WORKDIR /usr/src/app | ||
COPY . . | ||
|
||
# Params | ||
ARG RAILS_ENV="production" | ||
ARG RAILS_SERVE_STATIC_FILES="true" | ||
ARG RELATIVE_URL_ROOT="/app/root" | ||
# Install gems | ||
RUN bundle install \ | ||
&& RAILS_ENV=production bundle exec rake assets:precompile \ | ||
&& mkdir -p 777 /usr/src/app/coverage | ||
|
||
# Start a new build stage to minimise the final image size | ||
FROM base | ||
|
||
RUN addgroup -S app && adduser -S -G app app | ||
|
||
# Set environment variables and expose the running port | ||
ENV RAILS_ENV=$RAILS_ENV | ||
ENV RAILS_SERVE_STATIC_FILES=$RAILS_SERVE_STATIC_FILES | ||
ENV RELATIVE_URL_ROOT=$RELATIVE_URL_ROOT | ||
ENV SCRIPT_NAME=$RELATIVE_URL_ROOT | ||
EXPOSE 3000 | ||
|
||
# Precompile assets and add entrypoint script | ||
RUN rake assets:precompile | ||
ENTRYPOINT [ "sh", "./entrypoint.sh" ] | ||
WORKDIR /usr/src/app | ||
|
||
COPY --from=builder --chown=app /usr/local/bundle /usr/local/bundle | ||
COPY --from=builder --chown=app /usr/src/app ./app | ||
|
||
USER app | ||
|
||
COPY entrypoint.sh /app | ||
ENTRYPOINT [ "sh", "/app/entrypoint.sh" ] |
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 |
---|---|---|
|
@@ -3,6 +3,6 @@ | |
module Version | ||
MAJOR = 1 | ||
MINOR = 5 | ||
REVISION = 5 | ||
REVISION = 6 | ||
VERSION = "#{MAJOR}.#{MINOR}.#{REVISION}" | ||
end |
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 |
---|---|---|
|
@@ -5,9 +5,6 @@ deployments: | |
- tag: "v{ver}" | ||
deploy: "prod" | ||
publish: "prod" | ||
- tag: "v{ver}-rc" | ||
deploy: "preprod" | ||
publish: "preprod" | ||
- branch: "dev-infrastructure" | ||
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. Should this be just |
||
deploy: "dev" | ||
publish: "dev" | ||
|
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
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.
.dockeringnore
present twice as.dockerfile
and**/.dockerignore
looks a bit inconsistent when you're not doing the same for, say,.gitignore
.More significantly
Makefile
missing