upgrade to ruby 2.6.5
This commit is contained in:
parent
6387a83032
commit
b15cd673ea
3 changed files with 11 additions and 5 deletions
|
@ -1,6 +1,8 @@
|
|||
FROM sutty/sdk-ruby:latest AS build
|
||||
MAINTAINER "f <f@sutty.nl>"
|
||||
|
||||
ENV RACK_ENV=production
|
||||
|
||||
RUN install -dm 2750 -o app -g www-data /srv/http
|
||||
|
||||
USER app
|
||||
|
@ -8,14 +10,13 @@ WORKDIR /srv/http
|
|||
COPY --chown=app:www-data ./Gemfile .
|
||||
COPY --chown=app:www-data ./config.ru .
|
||||
RUN bundle install --path=./vendor
|
||||
RUN find ./vendor -name '*.so' | xargs -r strip --strip-unneeded
|
||||
|
||||
FROM sutty/daemonize:latest AS daemonize
|
||||
|
||||
RUN echo /home/builder/packages/home > /etc/apk/repositories
|
||||
RUN apk add --no-cache daemonize
|
||||
|
||||
FROM sutty/monit
|
||||
FROM sutty/monit:latest
|
||||
ENV RACK_ENV=production
|
||||
|
||||
RUN addgroup -g 82 -S www-data
|
||||
|
@ -32,7 +33,7 @@ RUN chmod 755 /usr/local/bin/geminabox
|
|||
# https://github.com/rubygems/rubygems/issues/2918
|
||||
# https://gitlab.alpinelinux.org/alpine/aports/issues/10808
|
||||
COPY ./rubygems-platform-musl.patch /tmp/
|
||||
RUN cd /usr/lib/ruby/2.5.0 && patch -Np 0 -i /tmp/rubygems-platform-musl.patch
|
||||
RUN cd /usr/lib/ruby/2.6.0 && patch -Np 0 -i /tmp/rubygems-platform-musl.patch
|
||||
|
||||
EXPOSE 9292
|
||||
VOLUME /srv/gems
|
||||
|
|
4
Gemfile
4
Gemfile
|
@ -1,4 +1,8 @@
|
|||
if ENV['RACK_ENV'] == 'production'
|
||||
source 'https://gems.sutty.nl'
|
||||
else
|
||||
source 'https://rubygems.org'
|
||||
end
|
||||
|
||||
gem 'redis-rack'
|
||||
gem 'hiredis'
|
||||
|
|
|
@ -3,6 +3,7 @@ set -e
|
|||
|
||||
dir=/srv/gems
|
||||
pid=/tmp/geminabox.pid
|
||||
log=/tmp/geminabox.log
|
||||
|
||||
chown -R app:www-data ${dir}
|
||||
cd ${dir}
|
||||
|
@ -13,6 +14,6 @@ for link in Gemfile Gemfile.lock .bundle config.ru vendor; do
|
|||
done
|
||||
|
||||
rm -f ${pid}
|
||||
daemonize -p ${pid} -l ${pid} -o ${dir}/access.log -e ${dir}/error.log \
|
||||
daemonize -p ${pid} -l ${pid} -o ${log} -e ${log} \
|
||||
-c ${dir} -a -u app \
|
||||
`which bundle` exec rackup
|
||||
|
|
Loading…
Reference in a new issue