Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ RUN apt-get update \

COPY assets/build/ ${REDMINE_BUILD_ASSETS_DIR}/

ARG REDMINE_BRANCH
ENV REDMINE_BRANCH=${REDMINE_BRANCH:-"master"}

RUN bash ${REDMINE_BUILD_ASSETS_DIR}/install.sh

COPY assets/runtime/ ${REDMINE_RUNTIME_ASSETS_DIR}/
Expand Down
13 changes: 7 additions & 6 deletions assets/build/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,17 @@ rm -rf /tmp/cron.${REDMINE_USER}

# install redmine, use local copy if available
exec_as_redmine mkdir -p ${REDMINE_INSTALL_DIR}
if [[ -f ${REDMINE_BUILD_ASSETS_DIR}/redmine-${REDMINE_VERSION}.tar.gz ]]; then
exec_as_redmine tar -zvxf ${REDMINE_BUILD_ASSETS_DIR}/redmine-${REDMINE_VERSION}.tar.gz --strip=1 -C ${REDMINE_INSTALL_DIR}
if [[ -f ${REDMINE_BUILD_ASSETS_DIR}/redmine-${REDMINE_VERSION}-${REDMINE_BRANCH}.tar.gz ]]; then
echo "Using local tar: ${REDMINE_BUILD_ASSETS_DIR/redmine-${REDMINE_VERSION}-${REDMINE_BRANCH}.tar.gz}"
exec_as_redmine tar -zvxf ${REDMINE_BUILD_ASSETS_DIR}/redmine-${REDMINE_VERSION}-${REDMINE_BRANCH}.tar.gz --strip=1 -C ${REDMINE_INSTALL_DIR}
else
echo "Downloading Redmine ${REDMINE_VERSION}..."
exec_as_redmine wget "https://github.com/OpenSourceBrain/redmine/archive/master.tar.gz" -O /tmp/redmine-${REDMINE_VERSION}.tar.gz
echo "Redmine tar not found. Downloading tar for Redmine branch: ${REDMINE_BRANCH}..."
exec_as_redmine wget "https://github.com/OpenSourceBrain/redmine/archive/${REDMINE_BRANCH}.tar.gz" -O /tmp/redmine-${REDMINE_VERSION}-${REDMINE_BRANCH}.tar.gz

echo "Extracting..."
exec_as_redmine tar -zxf /tmp/redmine-${REDMINE_VERSION}.tar.gz --strip=1 -C ${REDMINE_INSTALL_DIR}
exec_as_redmine tar -zxf /tmp/redmine-${REDMINE_VERSION}-${REDMINE_BRANCH}.tar.gz --strip=1 -C ${REDMINE_INSTALL_DIR}

exec_as_redmine rm -rf /tmp/redmine-${REDMINE_VERSION}.tar.gz
exec_as_redmine rm -rf /tmp/redmine-${REDMINE_VERSION}-${REDMINE_BRANCH}.tar.gz
fi

# HACK: we want both the pg and mysql2 gems installed, so we remove the
Expand Down