4 Commits

Author SHA1 Message Date
69c6b30255 use puma directly in Dockerfile
All checks were successful
Gitea Actions Demo / lint (push) Successful in 22s
Gitea Actions Demo / test (push) Successful in 11s
Gitea Actions Demo / docker (push) Successful in 2m3s
2025-04-20 12:45:26 -05:00
c068eacf58 use environment variable $PORT to set the port
All checks were successful
Gitea Actions Demo / lint (push) Successful in 26s
Gitea Actions Demo / test (push) Successful in 16s
Gitea Actions Demo / docker (push) Successful in 3m16s
2025-04-20 12:34:43 -05:00
89367e3169 switch to Debian bookworn Ruby image
All checks were successful
Gitea Actions Demo / lint (push) Successful in 21s
Gitea Actions Demo / test (push) Successful in 12s
Gitea Actions Demo / docker (push) Successful in 2m7s
2025-04-20 12:23:00 -05:00
42e6830cca bundle update
All checks were successful
Gitea Actions Demo / lint (push) Successful in 21s
Gitea Actions Demo / test (push) Successful in 12s
Gitea Actions Demo / docker (push) Successful in 1m32s
2025-04-19 11:25:37 -05:00
2 changed files with 29 additions and 27 deletions

View File

@@ -1,19 +1,19 @@
FROM ruby:alpine AS base
ARG RUBY_VERSION="3.4.3"
FROM ruby:${RUBY_VERSION} AS base
WORKDIR /app
RUN <<EOT
apt-get update
gem update --system --no-document
gem install -N bundler
apk update
apk upgrade --no-cache
EOT
FROM base AS build
RUN <<EOT
apk add gcc musl-dev ruby-dev make
apt-get install --yes gcc make
EOT
COPY Gemfile* .
@@ -26,15 +26,17 @@ EOT
FROM base
# RUN useradd ruby --home /app --shell /bin/sh
RUN adduser ruby -h /app -D
ENV PORT=4567
USER ruby:ruby
# RUN useradd ruby --home /app --shell /bin/sh
RUN useradd --home /app --create-home app
USER app:app
COPY --from=build /usr/local/bundle /usr/local/bundle
COPY --from=build --chown=ruby:ruby /app /app
COPY --from=build --chown=app:app /app /app
COPY --chown=ruby:ruby . .
COPY --chown=app:app . .
EXPOSE 4567
CMD [ "bundle", "exec", "rackup", "--host", "0.0.0.0", "--port", "4567" ]
CMD [ "puma", "--bind", "0.0.0.0", "--port", "$PORT" ]

View File

@@ -5,7 +5,7 @@ GEM
ast (2.4.3)
base64 (0.2.0)
bigdecimal (3.1.9)
csv (3.3.3)
csv (3.3.4)
diff-lcs (1.6.1)
httparty (0.23.1)
csv
@@ -27,15 +27,15 @@ GEM
ruby2_keywords (~> 0.0.1)
nanoid (2.0.0)
nio4r (2.7.4)
parallel (1.26.3)
parser (3.3.7.4)
parallel (1.27.0)
parser (3.3.8.0)
ast (~> 2.4.1)
racc
prism (1.4.0)
puma (6.6.0)
nio4r (~> 2.0)
racc (1.8.1)
rack (3.1.12)
rack (3.1.13)
rack-protection (4.1.1)
base64 (>= 0.1.0)
logger (>= 1.6.0)
@@ -65,7 +65,7 @@ GEM
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-support (3.13.2)
rubocop (1.73.2)
rubocop (1.75.2)
json (~> 2.3)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.1.0)
@@ -73,17 +73,17 @@ GEM
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 2.9.3, < 3.0)
rubocop-ast (>= 1.38.0, < 2.0)
rubocop-ast (>= 1.44.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.43.0)
rubocop-ast (1.44.1)
parser (>= 3.3.7.2)
prism (~> 1.4)
rubocop-performance (1.24.0)
rubocop-performance (1.25.0)
lint_roller (~> 1.1)
rubocop (>= 1.72.1, < 2.0)
rubocop (>= 1.75.0, < 2.0)
rubocop-ast (>= 1.38.0, < 2.0)
ruby-lsp (0.23.13)
ruby-lsp (0.23.14)
language_server-protocol (~> 3.17.0)
prism (>= 1.2, < 2.0)
rbs (>= 3, < 4)
@@ -103,19 +103,19 @@ GEM
rack-protection (= 4.1.1)
sinatra (= 4.1.1)
tilt (~> 2.0)
sorbet-runtime (0.5.11971)
standard (1.47.0)
sorbet-runtime (0.5.12026)
standard (1.49.0)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.0)
rubocop (~> 1.73.0)
rubocop (~> 1.75.2)
standard-custom (~> 1.0.0)
standard-performance (~> 1.7)
standard-performance (~> 1.8)
standard-custom (1.0.2)
lint_roller (~> 1.0)
rubocop (~> 1.50)
standard-performance (1.7.0)
standard-performance (1.8.0)
lint_roller (~> 1.1)
rubocop-performance (~> 1.24.0)
rubocop-performance (~> 1.25.0)
tilt (2.6.0)
ulid (1.4.0)
unicode-display_width (3.1.4)
@@ -149,4 +149,4 @@ DEPENDENCIES
uuid7
BUNDLED WITH
2.6.6
2.6.8