diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000000000000000000000000000000000000..7102138d16906aad6348bd01ff66ccccd52d39b5 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,48 @@ +/src/data/ +Dockerfile +.dockerignore +.gitlab-ci.yml +/rd-builder/ +/.git/ + +# compiled output +/dist +/tmp +/out-tsc +/build + +# dependencies +/node_modules + +# IDEs and editors +/.idea +.project +.classpath +.c9/ +*.launch +.settings/ +*.sublime-workspace + +# IDE - VSCode +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json + +# misc +/.sass-cache +/connect.lock +/coverage +/libpeerconnection.log +npm-debug.log +testem.log +/typings + +# e2e +/e2e/*.js +/e2e/*.map + +# System Files +.DS_Store +Thumbs.db diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..05749a0b29ff16ed119957515f8e15cf3b844568 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,15 @@ +image: docker:latest + +variables: + GIT_SUBMODULE_STRATEGY: recursive + IMG_NAME: "$CI_REGISTRY/jastadd/ragdoc-view:" + IMG_SUFFIX: "relations" + +deploy: + stage: deploy + tags: + - docker + script: + - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY + - docker build -t "$IMG_NAME""$IMG_SUFFIX" . + - docker push "$IMG_NAME""$IMG_SUFFIX" diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..29d55550da579486891157bf63d64162b315e9b8 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM node:15.6.0-buster +WORKDIR /ragdoc-view +ADD . /ragdoc-view/ +RUN npm install +RUN npm install -g @angular/cli@11.1.1 +VOLUME ["/data"] +VOLUME ["/dist"] +RUN chmod +x build-view.sh && ln -s /dist && cd src/ && ln -s /data +ENTRYPOINT ["./build-view.sh"] diff --git a/build-view.sh b/build-view.sh new file mode 100755 index 0000000000000000000000000000000000000000..f8f1dc93c4504f7d040209d3e17141076c027dfd --- /dev/null +++ b/build-view.sh @@ -0,0 +1,2 @@ +#!/bin/sh +ng build --base-href . --delete-output-path=false