89 lines
3.6 KiB
Docker
89 lines
3.6 KiB
Docker
FROM code.pztrn.name/containers/mirror/alpine:3.19.1
|
|
|
|
ENV REDMINE_VERSION=5.1.12
|
|
ENV RAILS_ENV=production
|
|
ENV BUNDLER_WITHOUT="development test"
|
|
ENV REDMINE_LANG=ru
|
|
ENV PURPLE_MINE_VERSION=2.16.2
|
|
ENV OPALE_VERSION=1.5.4
|
|
|
|
RUN apk add --no-cache ruby-etc ruby-irb ruby-dev postgresql-dev libxml2-dev xz unzip alpine-sdk git imagemagick libffi-dev libpq sed
|
|
|
|
WORKDIR /usr/src
|
|
|
|
RUN curl -L --output redmine-${REDMINE_VERSION}.zip https://github.com/redmine/redmine/archive/refs/tags/${REDMINE_VERSION}.zip && \
|
|
unzip redmine-${REDMINE_VERSION}.zip && \
|
|
mv redmine-${REDMINE_VERSION} redmine
|
|
|
|
WORKDIR /usr/src/redmine/plugins
|
|
|
|
COPY redmine_checklists redmine_checklists
|
|
|
|
RUN git clone https://github.com/kenkubomi/redmine_add_absolute_time.git && \
|
|
cd redmine_add_absolute_time && \
|
|
git reset --hard 8b8f79320f836fd05c942ed39b1b749a4418d18f && \
|
|
cd /usr/src/redmine/plugins && \
|
|
git clone -b 3.4.0 https://github.com/AlphaNodes/additionals.git && \
|
|
git clone -b 3.4.0 https://github.com/alphanodes/additional_tags.git && \
|
|
git clone https://github.com/fraoustin/redmine_admonition.git && \
|
|
cd redmine_admonition && \
|
|
git reset --hard 6719dcc136f63c828c91196971d2f6deacb611d5 && \
|
|
cd /usr/src/redmine/plugins && \
|
|
git clone https://github.com/fraoustin/redmine_closed_date.git && \
|
|
cd redmine_closed_date && \
|
|
git reset --hard 4336fac9170b1e51b38043ac3e597db656439738 && \
|
|
cd /usr/src/redmine/plugins && \
|
|
git clone https://github.com/alphanodes/redmine_issue_view_columns.git && \
|
|
cd redmine_issue_view_columns && \
|
|
git reset --hard 6084d882aa24961b6a3df6d8defe44dcb8965f66 && \
|
|
cd /usr/src/redmine/plugins && \
|
|
git clone https://github.com/AlphaNodes/redmine_messenger.git && \
|
|
cd redmine_messenger && \
|
|
git reset --hard 4d69bb20d7617d08abeb35ef9f444535a09457f2 && \
|
|
cd /usr/src/redmine/plugins && \
|
|
git clone -b add-redmine-5-support https://github.com/mc2soft/that_issue_reply_button.git && \
|
|
git clone https://github.com/HugoHasenbein/redmine_tint_issues.git && \
|
|
cd redmine_tint_issues && \
|
|
git reset --hard 3d71bdc6166b9ad9334e2cfa67de60d1c308a9b3 && \
|
|
cd /usr/src/redmine/plugins && \
|
|
git clone https://github.com/enricohuang/redmine_mermaid.git && \
|
|
cd redmine_mermaid && \
|
|
git reset --hard 60c89454a1616b31bf73716d24d2e95a22a57eff
|
|
|
|
WORKDIR /usr/src/redmine/public/themes
|
|
|
|
RUN curl -L --output v${OPALE_VERSION}.tar.gz https://github.com/gagnieray/opale/archive/refs/tags/${OPALE_VERSION}.tar.gz && \
|
|
tar -xf v${OPALE_VERSION}.tar.gz && \
|
|
rm -f v${OPALE_VERSION}.tar.gz && \
|
|
mv opale-"${OPALE_VERSION}" opale
|
|
|
|
WORKDIR /usr/src/redmine
|
|
|
|
COPY database.yml config/
|
|
|
|
COPY Gemfile.local .
|
|
|
|
RUN gem install bundler && \
|
|
bundle install && \
|
|
bundle exec rake generate_secret_token && \
|
|
rm -f config/database.yml
|
|
|
|
RUN apk del ruby-dev postgresql-dev libxml2-dev alpine-sdk libffi-dev && \
|
|
rm -rf /var/cache/apk/*
|
|
|
|
ADD https://github.com/tianon/gosu/releases/download/1.17/gosu-amd64 /sbin/gosu
|
|
RUN chmod +x /sbin/gosu && \
|
|
addgroup -g 998 -S docker && \
|
|
adduser -u 2001 -G docker -S redmine && \
|
|
chown -R redmine:docker * && \
|
|
chmod -R 775 *
|
|
|
|
RUN git config --global --add safe.directory /usr/src/redmine/plugins/additional_tags
|
|
|
|
EXPOSE 3000
|
|
|
|
# https://discuss.rubyonrails.org/t/rails-7-0-8-1-app-not-loading-due-to-nameerror-uninitialized-constant-wickedpdf-openstruct/85768/2
|
|
RUN cd config && sed -i "/Bundler/i require 'ostruct'" application.rb
|
|
|
|
CMD rm -f /usr/src/redmine/tmp/pids/server.pid && gosu redmine:docker bundle exec rake db:migrate && bundle exec rake redmine:plugins:migrate && bundle exec rake redmine:load_default_data && bundle exec rails server
|