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

Update with oh14.dev deployment and water.css

parent 2115807a
No related branches found
No related tags found
No related merge requests found
Pipeline #145959 failed
/node_modules/
/public/build/
.DS_Store
test-results.xml
include:
- template: Security/License-Scanning.gitlab-ci.yml
stages:
- "build"
- "deploy"
pages:
build_docker_main:
needs: []
image: node:14-alpine
stage: deploy
stage: "build"
image:
name: "gcr.io/kaniko-project/executor:debug"
entrypoint: [""]
script:
- npm install
- npm run build
- "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"
pages:
needs:
- "test"
stage: "deploy"
image: "node:18-alpine"
script:
- "npm install"
- "npm run build"
artifacts:
paths:
- public
only:
- master
- "public"
rules:
- if: "$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH"
deploy_to_caprover:
needs:
- "test"
- "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://swk-critical-path-tool.oh14.dev/"
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
MIT License
Copyright (c) 2021 Jonas Zohren
Copyright (c) 2023 Jonas Zohren
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
......
# SWK Critical Path Tool
WebApp für SWK-Studierende zur Berechnung und Visualisierung mit der "Kritischer Pfad" Methode.
> WebApp für SWK-Studierende zur Berechnung und Visualisierung mit der "Kritischer Pfad" Methode.
![Tabelle mit Aufgaben, darunter ein Graph der Aufgaben. Der kritische Pfad ist fett markiert.](swk-critical-path-tool.png)
## Get started
Install the dependencies...
## Development
```bash
cd svelte-app
npm install
```
...then start [Rollup](https://rollupjs.org):
```bash
npm run dev
```
Navigate to [localhost:5000](http://localhost:5000). You should see your app running. Edit a component file in `src`, save it, and reload the page to see your changes.
By default, the server will only respond to requests from localhost. To allow connections from other computers, edit the `sirv` commands in package.json to include the option `--host 0.0.0.0`.
If you're using [Visual Studio Code](https://code.visualstudio.com/) we recommend installing the official extension [Svelte for VS Code](https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode). If you are using other editors you may need to install a plugin in order to get syntax highlighting and intellisense.
## Building and running in production mode
To create an optimised version of the app:
```bash
npm run build
```
You can run the newly built app with `npm run start`. This uses [sirv](https://github.com/lukeed/sirv), which is included in your package.json's `dependencies` so that the app will work when you deploy to platforms like [Heroku](https://heroku.com).
## Single-page app mode
By default, sirv will only respond to requests that match files in `public`. This is to maximise compatibility with static fileservers, allowing you to deploy your app anywhere.
If you're building a single-page app (SPA) with multiple routes, sirv needs to be able to respond to requests for *any* path. You can make it so by editing the `"start"` command in package.json:
```js
"start": "sirv public --single"
```
## Using TypeScript
This template comes with a script to set up a TypeScript development environment, you can run it immediately after cloning the template with:
## Lizenz
```bash
node scripts/setupTypeScript.js
```
Or remove the script via:
```bash
rm scripts/setupTypeScript.js
```
## Deploying to the web
### With [Vercel](https://vercel.com)
Install `vercel` if you haven't already:
```bash
npm install -g vercel
```
Then, from within your project folder:
```bash
cd public
vercel deploy --name my-project
```
### With [surge](https://surge.sh/)
Install `surge` if you haven't already:
```bash
npm install -g surge
```
Then, from within your project folder:
```bash
npm run build
surge public my-project.surge.sh
```
MIT
\ No newline at end of file
{
"schemaVersion" :2 ,
"dockerfilePath" : "Dockerfile"
}
This diff is collapsed.
.tg.svelte-v4b29p.svelte-v4b29p{border-collapse:collapse;border-spacing:0}.tg.svelte-v4b29p td.svelte-v4b29p{border-color:black;border-style:solid;border-width:1px;font-family:Arial, sans-serif;font-size:14px;overflow:hidden;padding:10px 5px;word-break:normal}.tg.svelte-v4b29p th.svelte-v4b29p{border-color:black;border-style:solid;border-width:1px;font-family:Arial, sans-serif;font-size:14px;font-weight:normal;overflow:hidden;padding:10px 5px;word-break:normal}.tg.svelte-v4b29p .tg-0lax.svelte-v4b29p{text-align:left;vertical-align:top}input.svelte-v4b29p.svelte-v4b29p{width:6rem}input.svelte-v4b29p{width:6rem}
\ No newline at end of file
td.redText.svelte-1ernl9m{color:red}svg.svelte-1vsd1e7{width:100%;height:35rem;border:0.1rem solid;border-radius:0.4rem}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
No preview for this file type
......@@ -31,9 +31,9 @@
<style>
svg {
padding: 0.5rem;
min-height: 20rem;
min-width: 30rem;
border: 2px solid;
width: 100%;
height: 35rem;
border: 0.1rem solid;
border-radius: 0.4rem;
}
</style>
swk-critical-path-tool.png

43.4 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment