From af0d8b3458683d231b30ef2d8035561b58be752e Mon Sep 17 00:00:00 2001 From: an14051 Date: Wed, 13 May 2026 00:14:08 +0200 Subject: [PATCH] feat: update Docker configuration and .gitignore, remove unused JSON files --- .gitignore | 22 ++++++++++++++++++++++ docker/Dockerfile | 3 ++- docker/build.sh | 2 +- docker/deploy.sh | 2 +- docker/docker-compose.yml | 2 +- frontend/data/meta.json | 14 -------------- frontend/data/users.json | 10 ---------- frontend/proxy.ts | 2 +- 8 files changed, 28 insertions(+), 29 deletions(-) delete mode 100644 frontend/data/meta.json delete mode 100644 frontend/data/users.json diff --git a/.gitignore b/.gitignore index 4d9a47e..9102b3e 100644 --- a/.gitignore +++ b/.gitignore @@ -40,4 +40,26 @@ yarn-error.log* # typescript *.tsbuildinfo next-env.d.ts + +# build artifacts +/dist/ +/build/ +/.next/ +/frontend/.turbo/ + +# bun +.bun/ +bunfig.toml.local + +# cache & logs +.turbo/ +*.log +lerna-debug.log* + +# user data & uploads /frontend/data/uploads/ +/frontend/data/*.db +/frontend/data/*.db-shm +/frontend/data/*.db-wal +/frontend/data/*.migrated +/data/uploads/ diff --git a/docker/Dockerfile b/docker/Dockerfile index c191dde..978f85c 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -25,7 +25,8 @@ ENV NODE_ENV=production ENV NEXT_TELEMETRY_DISABLED=1 # Dedicated non-root user -RUN addgroup --system --gid 1001 nodejs && \ +RUN apt-get update && apt-get install -y --no-install-recommends adduser && rm -rf /var/lib/apt/lists/* && \ + addgroup --system --gid 1001 nodejs && \ adduser --system --uid 1001 nextjs # Next.js standalone output diff --git a/docker/build.sh b/docker/build.sh index c9493b4..409aa6e 100755 --- a/docker/build.sh +++ b/docker/build.sh @@ -5,7 +5,7 @@ set -euo pipefail REPO_ROOT="$(cd "$(dirname "$0")/.." && pwd)" -TAG="${1:-backerup-website:latest}" +TAG="${1:-gitea.doomlabs.de/kptltd00m/backerup-website:latest}" echo "==> Building image: $TAG" docker build \ diff --git a/docker/deploy.sh b/docker/deploy.sh index cad4015..4f96c3d 100755 --- a/docker/deploy.sh +++ b/docker/deploy.sh @@ -5,7 +5,7 @@ set -euo pipefail SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" -TAG="${1:-backerup-website:latest}" +TAG="${1:-gitea.doomlabs.de/kptltd00m/backerup-website:latest}" # 1. Build "$SCRIPT_DIR/build.sh" "$TAG" diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index bc11242..efc5f71 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -1,6 +1,6 @@ services: backerup-website: - image: backerup-website:latest + image: gitea.doomlabs.de/kptltd00m/backerup-website:latest container_name: backerup-website restart: unless-stopped ports: diff --git a/frontend/data/meta.json b/frontend/data/meta.json deleted file mode 100644 index 02e488a..0000000 --- a/frontend/data/meta.json +++ /dev/null @@ -1,14 +0,0 @@ -[ - { - "token": "-jB8pMdeKu", - "originalName": "liquidity-db.config.json", - "displayName": "DB", - "size": 5606, - "type": "config", - "uploadedAt": "2026-05-11T21:18:55.259Z", - "description": "Skibidi Ligma", - "group": "production", - "containerName": "liquidity-db", - "image": "postgres:16-alpine" - } -] \ No newline at end of file diff --git a/frontend/data/users.json b/frontend/data/users.json deleted file mode 100644 index d47bcb7..0000000 --- a/frontend/data/users.json +++ /dev/null @@ -1,10 +0,0 @@ -[ - { - "id": "00c94c52-f312-4152-a6ee-e3ce0b23b5f8", - "username": "admin", - "passwordHash": "827c32b2234fc18911ec8579ad6863df63b8cc3835b1f3a3f04016dfcd46f22e609cc3c99d5e09959ff8f2787f4169206ad5a9ca83beec2e70c14f8cca110cc8", - "salt": "c2030b38b34b2810f715453350100729", - "role": "admin", - "createdAt": "2026-05-12T12:46:52.082Z" - } -] \ No newline at end of file diff --git a/frontend/proxy.ts b/frontend/proxy.ts index e964775..6213885 100644 --- a/frontend/proxy.ts +++ b/frontend/proxy.ts @@ -75,7 +75,7 @@ export async function proxy(request: NextRequest) { if (token) { try { const { payload: p } = await jwtVerify(token, getSecretKey(), { algorithms: ['HS256'] }) - payload = p + payload = p as { userId?: string; username?: string; role?: string } } catch { // expired or tampered — treat as unauthenticated }