Skip to content
Snippets Groups Projects
Verified Commit 38d60d9d authored by Jonas Zohren's avatar Jonas Zohren :speech_balloon:
Browse files

chore: Update to oh14.dev deployment

parent 386af2f9
Branches
No related tags found
No related merge requests found
Pipeline #143052 passed
/node_modules/
/public/build/
.DS_Store
test-results.xml
\ No newline at end of file
stages:
- "test"
- "build"
- "deploy"
"test:mocha": "test:mocha":
needs: [] needs: []
image: "node:18-alpine" image: "node:18-alpine"
...@@ -25,3 +30,48 @@ pages: ...@@ -25,3 +30,48 @@ pages:
- "public" - "public"
only: only:
- "main" - "main"
build_docker_main:
needs: []
stage: "build"
image:
name: "gcr.io/kaniko-project/executor:debug"
entrypoint: [ "" ]
script:
- "mkdir -p /kaniko/.docker"
- 'echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json'
- "/kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:commit-$CI_COMMIT_SHORT_SHA --destination $CI_REGISTRY_IMAGE:latest"
rules:
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
build_docker_branches:
needs: []
stage: "build"
image:
name: "gcr.io/kaniko-project/executor:debug"
entrypoint: [ "" ]
script:
- "mkdir -p /kaniko/.docker"
- 'echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json'
- "/kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:commit-$CI_COMMIT_SHORT_SHA --destination $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-latest"
rules:
- if: '$CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH'
deploy_to_caprover:
needs:
- "build_docker_main"
stage: "deploy"
image:
name: "caprover/cli-caprover:latest"
entrypoint: [ "" ]
variables:
# We don't need the files, just tell CapRover to use the built docker image:
GIT_STRATEGY: none
script:
- "caprover deploy -h https://captain.$CAPROVER_URL -a $CAPROVER_APP --imageName $CI_REGISTRY_IMAGE:commit-$CI_COMMIT_SHORT_SHA"
environment:
name: "production"
url: "https://$CAPROVER_APP.$CAPROVER_URL/"
rules:
- if: "$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CAPROVER_URL && $CAPROVER_APP_TOKEN && $CAPROVER_APP"
FROM node:18-alpine AS build
WORKDIR /build
COPY package.json package-lock.json /build/
RUN npm install --ignore-scripts
COPY . .
RUN npm run build
FROM pierrezemb/gostatic AS final
COPY --from=build /build/public/ /srv/http/
\ No newline at end of file
{
"schemaVersion" :2 ,
"dockerfilePath" : "Dockerfile"
}
\ No newline at end of file
...@@ -56,11 +56,11 @@ ...@@ -56,11 +56,11 @@
and and
<a href="https://plotly.com/javascript/">Plotly</a> <a href="https://plotly.com/javascript/">Plotly</a>
<br /> <br />
<a href="https://oh14.de/datenschutzerklaerung.html" <a href="https://oh14.dev/datenschutz.html"
>Datenschutzerklärung</a >Datenschutzerklärung</a
> >
- -
<a href="https://gitlab.fachschaften.org/jfowl/wrums-tools">Source Code</a <a href="https://gitlab.fachschaften.org/oh14-dev/wrums-tools">Source Code</a
> >
</p> </p>
</div> </div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment