5 Commits

Author SHA1 Message Date
TeamCity
ca50a353e2 ci: bump version to v0.1.1 2025-12-07 20:49:09 +00:00
ecc78ab1b3 fix: FRO-28 Integrate Frontend Build as a seperate image (#3)
Reviewed-on: #3
Co-authored-by: Janis <janis.e.20@gmx.de>
Co-committed-by: Janis <janis.e.20@gmx.de>
2025-12-07 21:48:00 +01:00
TeamCity
84c0668eae ci: bump version to v0.1.0 2025-12-07 20:39:47 +00:00
aa399bf035 feat: FRO-28 Integrate Frontend Build as a seperate image (#2)
Reviewed-on: #2
Co-authored-by: Janis <janis.e.20@gmx.de>
Co-committed-by: Janis <janis.e.20@gmx.de>
2025-12-07 21:30:59 +01:00
7bc6ac89f0 feat: FRO-16 Switch to Quasar (#1)
Reviewed-on: #1
Co-authored-by: Janis <janis.e.20@gmx.de>
Co-committed-by: Janis <janis.e.20@gmx.de>
2025-12-07 20:59:24 +01:00
14 changed files with 973 additions and 849 deletions

34
CHANGELOG.md Normal file
View File

@@ -0,0 +1,34 @@
## 0.0.0 (2025-12-07)
### Features
* FRO-16 Switch to Quasar ([#1](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Frontend/issues/1)) ([7bc6ac8](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Frontend/commit/7bc6ac89f01df9a6bd5ec236d79041772839d907))
## 0.0.0 (2025-12-07)
### Features
* FRO-16 Switch to Quasar ([#1](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Frontend/issues/1)) ([7bc6ac8](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Frontend/commit/7bc6ac89f01df9a6bd5ec236d79041772839d907))
* FRO-28 Integrate Frontend Build as a seperate image ([#2](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Frontend/issues/2)) ([aa399bf](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Frontend/commit/aa399bf035d4c0f2702c2adf296865ec99e03fbb))
## 0.0.0 (2025-12-07)
### Features
* FRO-16 Switch to Quasar ([#1](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Frontend/issues/1)) ([7bc6ac8](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Frontend/commit/7bc6ac89f01df9a6bd5ec236d79041772839d907))
* FRO-28 Integrate Frontend Build as a seperate image ([#2](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Frontend/issues/2)) ([aa399bf](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Frontend/commit/aa399bf035d4c0f2702c2adf296865ec99e03fbb))
## 0.0.0 (2025-12-07)
### Features
* FRO-16 Switch to Quasar ([#1](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Frontend/issues/1)) ([7bc6ac8](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Frontend/commit/7bc6ac89f01df9a6bd5ec236d79041772839d907))
* FRO-28 Integrate Frontend Build as a seperate image ([#2](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Frontend/issues/2)) ([aa399bf](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Frontend/commit/aa399bf035d4c0f2702c2adf296865ec99e03fbb))
## 0.0.0 (2025-12-07)
### Features
* FRO-16 Switch to Quasar ([#1](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Frontend/issues/1)) ([7bc6ac8](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Frontend/commit/7bc6ac89f01df9a6bd5ec236d79041772839d907))
* FRO-28 Integrate Frontend Build as a seperate image ([#2](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Frontend/issues/2)) ([aa399bf](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Frontend/commit/aa399bf035d4c0f2702c2adf296865ec99e03fbb))
## [0.0.0](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Frontend/compare/0.1.0...0.0.0) (2025-12-07)
### Bug Fixes
* FRO-28 Integrate Frontend Build as a seperate image ([#3](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Frontend/issues/3)) ([ecc78ab](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Frontend/commit/ecc78ab1b3772bffbae62a7b926cfc0ca8be4ff4))

24
Dockerfile Normal file
View File

@@ -0,0 +1,24 @@
FROM node:lts-alpine3.23 AS builder
WORKDIR /app
COPY package*.json ./
COPY pnpm-lock.yaml* yarn.lock* ./
RUN npm install
COPY . .
RUN npm run build
FROM nginx:stable-alpine AS production
RUN apk add --no-cache gettext
RUN rm -rf /usr/share/nginx/html/*
COPY --from=builder /app/dist /usr/share/nginx/html
COPY public/env.template.js /usr/share/nginx/html/env.template.js
COPY docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x /docker-entrypoint.sh
EXPOSE 80
ENTRYPOINT ["/docker-entrypoint.sh"]

19
docker-entrypoint.sh Normal file
View File

@@ -0,0 +1,19 @@
#!/bin/sh
set -e
# Replace placeholders in env.template.js with environment variables and write env.js
TEMPLATE_PATH="/usr/share/nginx/html/env.template.js"
TARGET_PATH="/usr/share/nginx/html/env.js"
if [ -f "$TEMPLATE_PATH" ]; then
echo "Rendering runtime config from $TEMPLATE_PATH"
# export all variables for envsubst to access
# only substitute variables present in the template
envsubst < "$TEMPLATE_PATH" > "$TARGET_PATH"
else
echo "No runtime template found at $TEMPLATE_PATH, skipping"
fi
# Start nginx in foreground
exec nginx -g 'daemon off;'

6
env.d.ts vendored
View File

@@ -1 +1,7 @@
/// <reference types="vite/client" /> /// <reference types="vite/client" />
declare global {
interface Window { __RUNTIME_CONFIG__?: { API_URL?: string } }
}
export {};

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang=""> <html lang="en">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<link rel="icon" href="/favicon.ico"> <link rel="icon" href="/favicon.ico">
@@ -8,6 +8,8 @@
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>
<!-- runtime config injected at container start -->
<script src="/env.js"></script>
<script type="module" src="/src/main.ts"></script> <script type="module" src="/src/main.ts"></script>
</body> </body>
</html> </html>

1527
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -16,13 +16,13 @@
"format": "prettier --write --experimental-cli src/" "format": "prettier --write --experimental-cli src/"
}, },
"dependencies": { "dependencies": {
"@quasar/extras": "^1.17.0",
"quasar": "^2.18.6",
"vue": "^3.5.25", "vue": "^3.5.25",
"vue-router": "^4.6.3", "vue-router": "^4.6.3"
"tsparticles": "~3.9.1",
"@tsparticles/vue3": "~3.0.1",
"bootstrap-vue-next": "~0.40.9"
}, },
"devDependencies": { "devDependencies": {
"@quasar/vite-plugin": "^1.10.0",
"@tsconfig/node24": "^24.0.3", "@tsconfig/node24": "^24.0.3",
"@types/node": "^24.10.1", "@types/node": "^24.10.1",
"@vitejs/plugin-vue": "^6.0.2", "@vitejs/plugin-vue": "^6.0.2",
@@ -35,6 +35,7 @@
"jiti": "^2.6.1", "jiti": "^2.6.1",
"npm-run-all2": "^8.0.4", "npm-run-all2": "^8.0.4",
"prettier": "3.6.2", "prettier": "3.6.2",
"sass-embedded": "^1.93.3",
"typescript": "~5.9.0", "typescript": "~5.9.0",
"vite": "^7.2.4", "vite": "^7.2.4",
"vite-plugin-vue-devtools": "^8.0.5", "vite-plugin-vue-devtools": "^8.0.5",

4
public/env.template.js Normal file
View File

@@ -0,0 +1,4 @@
globalThis.__RUNTIME_CONFIG__ = {
API_URL: "${API_URL}"
};

View File

@@ -1,7 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import { RouterLink, RouterView } from 'vue-router' import { RouterLink, RouterView } from 'vue-router'
import HelloWorld from './components/HelloWorld.vue' import HelloWorld from './components/HelloWorld.vue'
import LoginView from "@/views/LoginView.vue";
</script> </script>
<template> <template>
@@ -9,18 +8,16 @@ import LoginView from "@/views/LoginView.vue";
<img alt="Vue logo" class="logo" src="@/assets/logo.svg" width="125" height="125" /> <img alt="Vue logo" class="logo" src="@/assets/logo.svg" width="125" height="125" />
<div class="wrapper"> <div class="wrapper">
<!-- <HelloWorld msg="You did it!" />--> <HelloWorld msg="You did it!" />
<!-- <nav>--> <nav>
<!-- <RouterLink to="/">Home</RouterLink>--> <RouterLink to="/">Home</RouterLink>
<!-- <RouterLink to="/about">About</RouterLink>--> <RouterLink to="/about">About</RouterLink>
<!-- <RouterLink to="/login">Login</RouterLink>--> </nav>
<!-- </nav>-->
<LoginView/>
</div> </div>
</header> </header>
<!-- <RouterView />--> <RouterView />
</template> </template>
<style scoped> <style scoped>

View File

@@ -3,16 +3,9 @@ import './assets/main.css'
import { createApp } from 'vue' import { createApp } from 'vue'
import App from './App.vue' import App from './App.vue'
import router from './router' import router from './router'
import Particles from "@tsparticles/vue3";
import { loadFull } from "tsparticles";
const app = createApp(App) const app = createApp(App)
app.use(router) app.use(router)
app.use(Particles, {
init: async engine => {
await loadFull(engine);
},
})
app.mount('#app') app.mount('#app')

View File

@@ -1,6 +1,5 @@
import { createRouter, createWebHistory } from 'vue-router' import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue' import HomeView from '../views/HomeView.vue'
import LoginView from '../views/LoginView.vue'
const router = createRouter({ const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL), history: createWebHistory(import.meta.env.BASE_URL),
@@ -10,11 +9,6 @@ const router = createRouter({
name: 'home', name: 'home',
component: HomeView, component: HomeView,
}, },
{
path: '/login',
name: 'login',
component: LoginView,
},
{ {
path: '/about', path: '/about',
name: 'about', name: 'about',

14
src/runtimeConfig.ts Normal file
View File

@@ -0,0 +1,14 @@
// runtimeConfig.ts
// Reads runtime configuration injected into window.__RUNTIME_CONFIG__ (created by env.js at container start)
declare global {
interface Window { __RUNTIME_CONFIG__?: { API_URL?: string } }
}
const runtime = (globalThis as any).__RUNTIME_CONFIG__ || {};
export const API_URL = runtime.API_URL || (import.meta.env.VITE_API_URL as string) || 'http://localhost:9000';
export function getApiUrl(): string {
return API_URL;
}

View File

@@ -1,150 +0,0 @@
<script lang="ts" setup>
const options = {
"particles": {
"number": {
"value": 80,
"density": {
"enable": true,
"area": 800
}
},
"color": {
"value": "#ffffff"
},
"shape": {
"type": "circle",
"stroke": {
"width": 0,
"color": "#000000"
},
"polygon": {
"sides": 5
},
"image": {
"src": "img/github.svg",
"width": 100,
"height": 100
}
},
"opacity": {
"value": 0.5,
"random": false,
"animation": {
"enable": false,
"speed": 1,
"minimumValue": 0.1,
"sync": false
}
},
"size": {
"value": 3,
"random": true,
"animation": {
"enable": false,
"speed": 40,
"minimumValue": 0.1,
"sync": false
}
},
"links": {
"enable": true,
"distance": 150,
"color": "#ffffff",
"opacity": 0.4,
"width": 1
},
"move": {
"enable": true,
"speed": 1,
"direction": "none",
"random": false,
"straight": false,
"outModes": {
"default": "out"
},
"attract": {
"enable": false,
"rotate": {
"x": 600,
"y": 1200
}
}
}
},
"interactivity": {
"detectsOn": "canvas",
"events": {
"onHover": {
"enable": false,
"mode": "repulse"
},
"onClick": {
"enable": false,
"mode": "push"
},
"resize": true
},
"modes": {
"grab": {
"distance": 400,
"links": {
"opacity": 1
}
},
"bubble": {
"distance": 400,
"size": 40,
"duration": 2,
"opacity": 8,
"speed": 3
},
"repulse": {
"distance": 200,
"duration": 0.4
},
"push": {
"quantity": 4
},
"remove": {
"quantity": 2
}
}
},
"detectRetina": true
};
</script>
<template>
<div class="login-box">
</div>
<vue-particles
id="particles-js"
:options='options'
/>
</template>
<style scoped>
.login-box {
position: fixed;
align-items: center;
justify-content: center;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
display: flex;
width: 100%;
max-width: 420px;
padding: 1rem;
z-index: 2;
}
#loginParticles {
background-color: rgb(11, 8, 8);
background-size: cover;
background-repeat: no-repeat;
background-position: 50% 50%;
}
</style>

3
versions.env Normal file
View File

@@ -0,0 +1,3 @@
MAJOR=0
MINOR=1
PATCH=1