-
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.
Merge pull request #1 from MaastrichtU-BISS/sprint
Sprint
- Loading branch information
Showing
21 changed files
with
450 additions
and
773 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,51 @@ | ||
name: Build WebUI | ||
|
||
on: | ||
push: | ||
# Sequence of patterns matched against refs/heads | ||
branches: | ||
- '**' | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
|
||
jobs: | ||
containerize: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
- name: Extract branch name | ||
shell: bash | ||
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" | ||
id: extract_branch | ||
- name: downcase REPO | ||
run: | | ||
echo "REPO=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV} | ||
- name: Log in to the Container registry | ||
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build frontend | ||
id: build_frontend | ||
run: | | ||
cd cee && sh run_build.sh | ||
- name: Build container | ||
id: docker_build | ||
uses: docker/build-push-action@v2 | ||
if: steps.extract_branch.outputs.branch != 'main' | ||
with: | ||
context: . | ||
push: true | ||
tags: ghcr.io/${{ env.REPO }}:${{ steps.extract_branch.outputs.branch }} | ||
- name: Build container | ||
id: docker_build_main | ||
uses: docker/build-push-action@v2 | ||
if: steps.extract_branch.outputs.branch == 'main' | ||
with: | ||
context: . | ||
push: true | ||
tags: ghcr.io/${{ env.REPO }}:${{ steps.extract_branch.outputs.branch }}, ghcr.io/${{ env.REPO }}:latest |
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 |
---|---|---|
@@ -1,8 +1,12 @@ | ||
data/ | ||
env/ | ||
cee/cedar-embeddable-editor* | ||
**/cee/cedar-embeddable-editor* | ||
cee/output | ||
data/ | ||
cee/release*.zip | ||
src/static/cee | ||
src/templates/cee.html | ||
*.pyc | ||
venv/ | ||
venv/ | ||
**node_modules | ||
package*.json | ||
MaterialIcons* | ||
**/cee/styles.css | ||
.DS_Store |
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,12 @@ | ||
FROM python:3.8-bullseye | ||
|
||
RUN apt update && apt upgrade -y | ||
|
||
ADD src/ /app | ||
EXPOSE 5000 | ||
WORKDIR /app | ||
|
||
COPY requirements.txt requirements.txt | ||
RUN pip install -r requirements.txt | ||
|
||
CMD ["python", "run.py"] |
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
This file was deleted.
Oops, something went wrong.
File renamed without changes.
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,29 @@ | ||
version='2.6.41' | ||
|
||
cd /build | ||
|
||
cp /input/*.ts ./ | ||
|
||
rm -Rf cedar-embeddable-editor* | ||
rm -Rf release-*.zip | ||
|
||
# Download and unzip release version of CEE | ||
curl -L -o release-$version.zip https://github.com/metadatacenter/cedar-embeddable-editor/archive/refs/tags/release-$version.zip | ||
unzip release-$version.zip | ||
|
||
# # Override files needed to work in our situation | ||
# cp app.component.ts cedar-embeddable-editor-release-$version/src/app/app.component.ts | ||
# cp app.module.ts cedar-embeddable-editor-release-$version/src/app/app.module.ts | ||
|
||
# Build project | ||
cd cedar-embeddable-editor-release-$version | ||
sed -i "/this.messageHandlerService.traceObject/ a window.location.href = '\\/';" src/app/modules/shared/components/cedar-data-saver/cedar-data-saver.component.ts | ||
npm install --no-audit | ||
# node_modules/@angular/cli/bin/ng build --configuration production --baseHref="./static/cee/" | ||
export NG_CLI_ANALYTICS=ci | ||
npm run ng build -- --configuration production --output-hashing=none --base-href="./static/cee/" | ||
|
||
# copy output | ||
cp -R ./dist/cedar-embeddable-editor/* /output | ||
|
||
cat /output/{runtime,polyfills,main}.js > /output/cedar-embeddable-editor.js |
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,17 @@ | ||
NODE_VERSION=16 | ||
|
||
docker volume create node-$NODE_VERSION-cedar-build | ||
|
||
rm -Rf $(pwd)/output | ||
|
||
docker run --rm -v $(pwd)/input:/input -v $(pwd)/output:/output -v node-$NODE_VERSION-cedar-build:/build node:$NODE_VERSION-bullseye /bin/bash /input/build_frontend.sh | ||
|
||
mkdir -p $(pwd)/../src/static/cee/node_modules | ||
# Add static folder prefix to load font type correctly in javascript | ||
sed 's/MaterialIcons/static\/cee\/MaterialIcons/g' output/cedar-embeddable-editor.js > $(pwd)/../src/static/cee/cedar-embeddable-editor.js | ||
|
||
docker run --rm -v $(pwd)/output:/output --workdir /output node:$NODE_VERSION-bullseye npm install @webcomponents/webcomponentsjs | ||
|
||
cp -R $(pwd)/output/node_modules $(pwd)/../src/static/cee | ||
cp $(pwd)/output/styles.css $(pwd)/../src/static/cee/ | ||
cp $(pwd)/output/MaterialIcons-* $(pwd)/../src/static/cee/ |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,25 @@ | ||
version: '3.8' | ||
services: | ||
rdf-store: | ||
image: ghcr.io/maastrichtu-cds/fair_tools_docker-graphdb/docker-graphdb:latest | ||
ports: | ||
- "7200:7200" | ||
environment: | ||
- GDB_HEAP_SIZE=2g | ||
- GDB_MIN_MEM=1g | ||
- GDB_MAX_MEM=2g | ||
healthcheck: | ||
test: ["CMD", "curl", "-f", "http://localhost:7200/repositories"] | ||
interval: 5s | ||
timeout: 3s | ||
retries: 5 | ||
semforms: | ||
image: ghcr.io/maastrichtu-biss/semanticforms | ||
ports: | ||
- "5000:5000" | ||
volumes: | ||
- ./data:/app/data | ||
- ./src/config.yaml:/app/config.yaml | ||
depends_on: | ||
rdf-store: | ||
condition: service_healthy |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,8 +1,10 @@ | ||
server: | ||
storageFolder: ./data | ||
rdf_endpoint: http://localhost:7200/repositories/public_dump | ||
rdf_endpoint_update: http://localhost:7200/repositories/public_dump/statements | ||
server_url: "http://rdf-store:7200" | ||
repository_name: "semantic_forms" | ||
update_endpoint_suffix: "/statements" | ||
template: | ||
source: file | ||
location: template.json | ||
instance_base_url: http://localhost/template-instances | ||
source: cedar | ||
templateId: 102d2c3b-2958-42b1-8baf-8a25ced9aca8 | ||
instance_base_url: http://localhost/template-instances | ||
title_predicate: http://purl.org/dc/terms/title |
Oops, something went wrong.