first commit

This commit is contained in:
2025-06-27 21:43:54 +02:00
commit 6ef4576cb2
33 changed files with 2185 additions and 0 deletions

8
Svelte/Dockerfile Normal file
View File

@@ -0,0 +1,8 @@
FROM alpine:3.22
LABEL Maintainer "Stephan Richter <s.richter@srsoftware.de>"
RUN apk add bash npm
RUN adduser -Dh /home/svelte svelte
ADD script /opt
USER svelte
WORKDIR /home/svelte
CMD /bin/bash

14
Svelte/Makefile Normal file
View File

@@ -0,0 +1,14 @@
default: devel
build: image
docker run --name svelte-build \
-d svelte
image:
docker build -t svelte .
devel: image
-docker rm -f svelte
docker run --name svelte \
-v ../frontend:/home/svelte/frontend \
-p 5173:5173 \
-ti svelte /opt/svelte-init

14
Svelte/script/svelte-init Executable file
View File

@@ -0,0 +1,14 @@
#!/bin/bash
if [ ! -f "/home/svelte/frontend/vite.config.js" ]; then
npm create -y vite@6 frontend -- --template svelte
cd frontend
npm install
else
echo Svelte-Project recognized, starting…
cd frontend
fi
npm run dev -- --host 0.0.0.0
npm run build
bash