Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

softserv updates #1

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
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
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ARG FCREPO_VERSION
RUN bash ./repack.sh

FROM jetty:9-jre8
LABEL org.opencontainers.image.source https://github.com/samvera-labs/docker-fcrepo
LABEL org.opencontainers.image.source https://github.com/scientist-softserv/docker-fcrepo
USER root
RUN mkdir -p /data ${JETTY_BASE}/etc ${JETTY_BASE}/modules
ADD assets/fedora-entrypoint.sh /
Expand Down
2 changes: 1 addition & 1 deletion assets/fedora-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ fi

MODESHAPE_CONFIG=${MODESHAPE_CONFIG:-classpath:/config/${DEFAULT_CONFIG}/repository.json}
export JAVA_OPTIONS="${JAVA_OPTIONS} -Dfcrepo.home=/data -Dfcrepo.modeshape.configuration=${MODESHAPE_CONFIG}"
su -s /bin/bash -c "exec /docker-entrypoint.sh $@" jetty
su -s /bin/bash -c "JAVA_HOME=/opt/java/openjdk; PATH=$PATH:/usr/local/jetty/bin:/opt/java/openjdk/bin; exec /docker-entrypoint.sh $@" jetty
8 changes: 4 additions & 4 deletions assets/repack.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
#!/bin/bash

echo "Downloading Fedora v${FCREPO_VERSION} .war file"
curl -# -Lo /build/fedora.war https://github.com/fcrepo4/fcrepo4/releases/download/fcrepo-${FCREPO_VERSION}/fcrepo-webapp-${FCREPO_VERSION}.war
curl -# -Lo /build/fedora.war https://github.com/scientist-softserv/fcrepo/releases/download/fcrepo-${FCREPO_VERSION}/fcrepo-webapp-${FCREPO_VERSION}.war
echo "Extracting Fedora v${FCREPO_VERSION} .war file"
jar -xf /build/fedora.war

curl --silent -I https://raw.githubusercontent.com/fcrepo4/fcrepo4/fcrepo-${FCREPO_VERSION}/fcrepo-webapp/src/main/jetty-console/WEB-INF/web.xml \
curl --silent -I https://raw.githubusercontent.com/scientist-softserv/fcrepo/fcrepo-${FCREPO_VERSION}/fcrepo-webapp/src/main/jetty-console/WEB-INF/web.xml \
| head -1 \
| grep "200 OK" > /dev/null

if [[ $? == 0 ]]; then
echo "Downloading Fedora v${FCREPO_VERSION} one-click web.xml"
curl -# -Lo WEB-INF/web.xml https://raw.githubusercontent.com/fcrepo4/fcrepo4/fcrepo-${FCREPO_VERSION}/fcrepo-webapp/src/main/jetty-console/WEB-INF/web.xml
curl -# -Lo WEB-INF/web.xml https://raw.githubusercontent.com/scientist-softserv/fcrepo/${FCREPO_VERSION}/fcrepo-webapp/src/main/webapp/WEB-INF/web.xml
echo "Repacking Fedora v${FCREPO_VERSION} .war file"
jar -cf /build/fedora.war .
fi
cp WEB-INF/web.xml /build/override-web.xml
cp WEB-INF/web.xml /build/override-web.xml
4 changes: 2 additions & 2 deletions bin/build
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/bin/bash

DOCKER_REPO=${DOCKER_REPO:-ghcr.io/samvera/fcrepo4}
DOCKER_REPO=${DOCKER_REPO:-ghcr.io/scientist-softserv/docker-fcrepo}

function latest_release() {
curl -s -H accept:application/vnd.github.v3+json https://api.github.com/repos/fcrepo4/fcrepo4/releases/latest | jq -r '.tag_name | split("-") | last'
curl -s -H accept:application/vnd.github.v3+json https://api.github.com/repos/scientist-softserv/fcrepo/releases/latest | jq -r '.tag_name | split("-") | last'
}

FCREPO_VERSION=${1:-$(latest_release)}
Expand Down
4 changes: 2 additions & 2 deletions bin/build-all
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash

DOCKER_REPO=${DOCKER_REPO:-ghcr.io/samvera/fcrepo4}
DOCKER_REPO=${DOCKER_REPO:-ghcr.io/scientist-softserv/fcrepo}

RELEASES=$(curl --silent -f -lSL 'https://api.github.com/repos/fcrepo4/fcrepo4/releases?per_page=50' \
RELEASES=$(curl --silent -f -lSL 'https://api.github.com/repos/scientist-softserv/fcrepo/releases?per_page=50' \
| jq -r '.[].tag_name' \
| cut -d '-' -f 2-)
TO_BUILD=""
Expand Down