Skip to content

Commit

Permalink
Merge pull request #31 from mlibrary/2023-06-05-updates
Browse files Browse the repository at this point in the history
June 2023 dependency updates.
  • Loading branch information
niquerio authored Jun 6, 2023
2 parents 9ce8dc4 + 43f3530 commit 10825f2
Show file tree
Hide file tree
Showing 10 changed files with 91 additions and 112 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-deploy-on-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
with:
image_name: ${{ vars.IMAGE_NAME }}
tag: ${{ github.event.release.tag_name }}
dockerfile: Dockerfile.prod
dockerfile: Dockerfile
secrets: inherit

deploy-production:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
with:
image_name: ${{ vars.IMAGE_NAME }}
tag: ${{ github.sha }}
dockerfile: Dockerfile.prod
dockerfile: Dockerfile
secrets: inherit

deploy-testing:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
with:
image_name: ${{ vars.IMAGE_NAME }}
tag: ${{ github.event.inputs.tag }}
dockerfile: Dockerfile.prod
dockerfile: Dockerfile
secrets: inherit

deploy-production:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/manual-deploy-unstable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
with:
image_name: ${{ vars.IMAGE_NAME }}
tag: ${{ github.event.inputs.tag }}
dockerfile: Dockerfile.prod
dockerfile: Dockerfile
secrets: inherit

deploy:
Expand Down
21 changes: 17 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
ARG RUBY_VERSION=3.2
FROM ruby:${RUBY_VERSION}
FROM ruby:3.2 AS development

ARG UNAME=app
ARG UID=1000
ARG GID=1000

LABEL maintainer="mrio@umich.edu"

RUN apt-get update -yqq && apt-get install -yqq --no-install-recommends \
apt-transport-https

Expand All @@ -28,3 +25,19 @@ USER $UNAME
ENV BUNDLE_PATH /gems

WORKDIR /app

FROM development AS production

COPY --chown=${UID}:${GID} . /app
ENV BUNDLE_WITHOUT development:test

RUN --mount=type=secret,id=gh_package_read_token,uid=1000 \
read_token="$(cat /run/secrets/gh_package_read_token)" \
&& BUNDLE_RUBYGEMS__PKG__GITHUB__COM=${read_token} bundle install

RUN npm ci

RUN npm run build
RUN cp js/* public/bundles/

CMD ["bundle", "exec", "rackup", "-p", "4567", "--host", "0.0.0.0"]
44 changes: 0 additions & 44 deletions Dockerfile.prod

This file was deleted.

40 changes: 20 additions & 20 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
GEM
remote: https://rubygems.org/
specs:
activemodel (7.0.4.3)
activesupport (= 7.0.4.3)
activesupport (7.0.4.3)
activemodel (7.0.5)
activesupport (= 7.0.5)
activesupport (7.0.5)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
addressable (2.8.4)
public_suffix (>= 2.0.2, < 6.0)
aes_key_wrap (1.1.0)
anyway_config (2.4.0)
anyway_config (2.4.1)
ruby-next-core (>= 0.14.0)
ast (2.4.2)
attr_required (1.0.1)
Expand All @@ -26,21 +26,21 @@ GEM
diff-lcs (1.5.0)
docile (1.4.0)
dry-initializer (3.1.1)
faraday (2.7.4)
faraday (2.7.5)
faraday-net_http (>= 2.0, < 3.1)
ruby2_keywords (>= 0.0.4)
faraday-follow_redirects (0.3.0)
faraday (>= 1, < 3)
faraday-net_http (3.0.2)
faraday-retry (2.1.0)
faraday-retry (2.2.0)
faraday (~> 2.0)
ffi (1.15.5)
hashdiff (1.0.1)
hashie (5.0.0)
http-2-next (0.5.1)
httpx (0.23.1)
httpx (0.23.3)
http-2-next (>= 0.4.1)
i18n (1.13.0)
i18n (1.14.1)
concurrent-ruby (~> 1.0)
json (2.6.3)
json-jwt (1.16.3)
Expand Down Expand Up @@ -106,7 +106,7 @@ GEM
byebug (~> 11.0)
pry (>= 0.13, < 0.15)
public_suffix (5.0.1)
puma (6.2.2)
puma (6.3.0)
nio4r (~> 2.0)
rack (2.2.7)
rack-oauth2 (2.2.0)
Expand Down Expand Up @@ -139,7 +139,7 @@ GEM
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-support (3.12.0)
rubocop (1.50.2)
rubocop (1.52.0)
json (~> 2.3)
parallel (~> 1.10)
parser (>= 3.2.0.0)
Expand All @@ -149,9 +149,9 @@ GEM
rubocop-ast (>= 1.28.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.28.1)
rubocop-ast (1.29.0)
parser (>= 3.2.1.0)
rubocop-performance (1.16.0)
rubocop-performance (1.18.0)
rubocop (>= 1.7.0, < 2.0)
rubocop-ast (>= 0.4.0)
ruby-next-core (0.15.3)
Expand All @@ -176,23 +176,23 @@ GEM
tilt (~> 2.0)
sinatra-flash (0.3.0)
sinatra (>= 1.0.0)
standard (1.28.2)
standard (1.29.0)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.0)
rubocop (~> 1.50.2)
rubocop (~> 1.52.0)
standard-custom (~> 1.0.0)
standard-performance (~> 1.0.1)
standard-custom (1.0.0)
standard-performance (~> 1.1.0)
standard-custom (1.0.1)
lint_roller (~> 1.0)
standard-performance (1.0.1)
standard-performance (1.1.0)
lint_roller (~> 1.0)
rubocop-performance (~> 1.16.0)
rubocop-performance (~> 1.18.0)
swd (2.0.2)
activesupport (>= 3)
attr_required (>= 0.0.5)
faraday (~> 2.0)
faraday-follow_redirects
tilt (2.1.0)
tilt (2.2.0)
timeout (0.3.2)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
Expand Down Expand Up @@ -261,4 +261,4 @@ DEPENDENCIES
yabeda-puma-plugin

BUNDLED WITH
2.4.7
2.4.13
14 changes: 10 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
version: '3'
version: '3.8'

services:
web:
build: .
build:
context: .
target: development
ports:
- "4567:4567"
- "9394:9394"
Expand All @@ -22,14 +24,18 @@ services:
- 0.0.0.0

css:
build: .
build:
context: .
target: development
volumes:
- .:/app
- gem_cache:/gems
command: bundle exec ruby ./config/css-listener.rb

js:
build: .
build:
context: .
target: development
volumes:
- .:/app
- gem_cache:/gems
Expand Down
Loading

0 comments on commit 10825f2

Please sign in to comment.