Skip to content
This repository has been archived by the owner on Nov 4, 2022. It is now read-only.

Commit

Permalink
Implement tool to build and publish UI container
Browse files Browse the repository at this point in the history
commit a1be7f9ee5aebfdd921988e1e1379c4e822730ef
Author: Marco La Rosa <[email protected]>
Date:   Sun Mar 1 11:12:52 2020 +1100

    implement tool to build and publish UI container

commit 38304d9d993ca2ae2282f661bbbe68794df1f622
Author: Marco La Rosa <[email protected]>
Date:   Sun Mar 1 11:12:34 2020 +1100

    separate configuration to own folder
  • Loading branch information
marcolarosa committed Mar 1, 2020
1 parent 19e57f4 commit 138f215
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
ocfl-repository
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM node:12-stretch AS builder
ADD ./ui /srv
RUN cd /srv && rm -rf ./node_modules && npm run build:production

FROM nginx:latest
COPY --from=builder /srv/dist/* /usr/share/nginx/html/
COPY configuration/generic-configuration.json /usr/share/nginx/html
COPY nginx/default.conf /etc/nginx/conf.d/default.conf
COPY nginx/mime.types /etc/nginx/mime.types
20 changes: 20 additions & 0 deletions configuration/generic-configuration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"service": {
"search": "/search",
"api": null
},
"imageFormats": ["image/jpg", "image/jpeg"],
"audioFormats": ["audio/mpeg"],
"videoFormats": ["video/quicktime", "video/mp4"],
"documentFileExtensions": [
"pdf",
"doc",
"docx",
"xls",
"xlsx",
"ppt",
"pptx"
],
"transcriptionFileExtensions": ["eaf", "trs", "ixt", "flextext"],
"indexerMetadataNamespace": "ocfl-indexer:meta"
}
File renamed without changes.
45 changes: 45 additions & 0 deletions publish-new-release
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/bin/bash

TAG="coedl/ocfl-viewer"

# list current tags in repo
echo -e "Current Tags: \n\n"
git tag -l

# get the new version tag
echo ""
read -p 'Please provide a tag for this release (major.minor.patch): ' VERSION
echo ""

read -p "Are you sure you wish to tag this release '${VERSION}'? type: 'yes': " resp
echo ""
if [ "$resp" != "yes" ] ; then
echo "Ok. Stopping now."
exit 0
fi

# tag the repo with the new version
echo -e "Ok - Building the new container\n\n"
git tag "v${VERSION}"

# get the tag to be used for the docker images
echo 'What tag should be used for this image? [default: coedl/ocfl-viewer]'
read -p 'Tag: (enter to use the default)' resp
if [ ! -z ${resp} ] ; then
TAG="$resp"
fi

echo -e "\nSetting tag to: ${TAG}\n"

# build the container tagging with the specified tag and version
docker build -t ${TAG}:${VERSION} .
docker image tag ${TAG}:${VERSION} ${TAG}:latest

# push the new container
echo -e "\nLog in to docker hub to push the container."
docker login
docker push ${TAG}:${VERSION}
docker push ${TAG}:latest

# push the git tags
git push origin --tags

0 comments on commit 138f215

Please sign in to comment.