Source code of daemsing.koeln
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

49 lines
1.6 KiB

FROM ruby:2.6.5-alpine
LABEL maintainer="Christian Aust <datenimperator@gmail.com>" \
org.label-schema.name="Daemsing Server" \
org.label-schema.description="Daemsing website project on Rails" \
org.label-schema.url="https://www.daemsing.koeln/" \
org.label-schema.vendor="Christian Aust" \
org.label-schema.schema-version="1.0"
# Bundle into the temp directory
WORKDIR /tmp
ADD Gemfile* ./
ENV PATH=/root/.yarn/bin:$PATH \
APP_HOME=/app \
RAILS_ENV=production \
RACK_ENV=production \
RAILS_LOG_TO_STDOUT=1 \
RAILS_SERVE_STATIC_FILES=1
RUN apk add --update tzdata; \
cp /usr/share/zoneinfo/Europe/Berlin /etc/localtime; \
echo "Europe/Berlin" > /etc/timezone; \
echo "gem: --no-ri --no-rdoc" > ~/.gemrc; \
gem install bundler; \
apk add --virtual runtime-deps bash nodejs sqlite sqlite-libs imagemagick; \
apk add --virtual build-yarn curl; \
touch ~/.bashrc; \
curl -o- -L https://yarnpkg.com/install.sh | sh; \
apk del build-yarn; \
apk add --virtual build-deps build-base libxml2-dev libxslt-dev sqlite-dev; \
bundle config set without 'development test'; \
bundle config set deployment 'true'; \
bundle install; \
bundle clean; \
apk del build-deps; \
rm -rf /var/cache/apk/*
COPY . $APP_HOME
WORKDIR $APP_HOME
RUN yarn install --prod --ignore-optional --silent --no-progress; \
bundle exec rake assets:precompile; \
rm -Rf ./node_modules ./tmp/cache/* /tmp/*
VOLUME $APP_HOME/data
EXPOSE 3000
CMD ["bundle", "exec", "rails", "server", "-b", "0.0.0.0", "-e", "production"]