This repository has been archived by the owner on Nov 4, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement tool to build and publish UI container
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
1 parent
19e57f4
commit 138f215
Showing
5 changed files
with
76 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules | ||
ocfl-repository |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |