2 Commits

7 changed files with 13 additions and 8 deletions

View File

@@ -4,7 +4,7 @@ RUN apk add --no-cache libc6-compat openssl
WORKDIR /app
COPY package.json package-lock.json* ./
RUN npm ci --ignore-scripts
RUN npm ci --ignore-scripts --legacy-peer-deps
# Stage 2: Builder
FROM node:20-alpine AS builder
@@ -46,7 +46,7 @@ COPY --from=builder /app/node_modules/.bin/prisma ./node_modules/.bin/prisma
COPY --from=builder /app/node_modules/bcryptjs ./node_modules/bcryptjs
COPY --from=builder /app/node_modules/stripe ./node_modules/stripe
COPY --from=builder /app/package.json ./package.json
RUN npm install --omit=dev socket.io@4.7.4 @react-pdf/renderer@3.4.2 qrcode@1.5.3 --no-save
RUN npm install --omit=dev --legacy-peer-deps socket.io@4.7.4 @react-pdf/renderer@3.4.4 qrcode@1.5.4 --no-save
COPY server-custom.js ./server-custom.js
COPY docker-entrypoint.sh ./docker-entrypoint.sh

View File

@@ -24,7 +24,7 @@ services:
- USER_UID=1000
- USER_GID=1000
- GITEA__database__DB_TYPE=sqlite3
- GITEA__server__ROOT_URL=http://192.168.1.183:3100
- GITEA__server__ROOT_URL=https://git.purepixel.ch
- GITEA__server__HTTP_PORT=3000
- GITEA__server__LFS_START_SERVER=true
volumes:
@@ -43,3 +43,4 @@ volumes:
networks:
lageplan_lageplan-net:
external: true

View File

@@ -77,7 +77,7 @@ services:
# ─── Lageplan Web App ──────────────────────
web:
image: lageplan-web:latest
image: 192.168.1.183:3100/adminpepe/lageplan:latest
restart: unless-stopped
environment:
DATABASE_URL: postgresql://${POSTGRES_USER:-lageplan}:${POSTGRES_PASSWORD:-lageplan_secret}@db:5432/${POSTGRES_DB:-lageplan}

View File

@@ -35,7 +35,7 @@ const nextConfig = {
key: 'Content-Security-Policy',
value: [
"default-src 'self'",
"script-src 'self' 'unsafe-inline' 'unsafe-eval'",
"script-src 'self' 'unsafe-inline' 'unsafe-eval' blob:",
"style-src 'self' 'unsafe-inline'",
"img-src 'self' data: blob: https://*.tile.openstreetmap.org https://api.maptiler.com http://localhost:9000 http://minio:9000",
"font-src 'self' data:",

View File

@@ -1,6 +1,6 @@
{
"name": "lageplan",
"version": "1.0.0",
"version": "1.0.1",
"description": "Feuerwehr Lageplan - Krokier-App für Einsatzdokumentation",
"private": true,
"scripts": {

View File

@@ -38,6 +38,7 @@ import {
Key,
Shield,
Building2,
MapPin,
} from 'lucide-react'
import { HoseSettingsDialog } from '@/components/dialogs/hose-settings-dialog'
import type { Project, DrawFeature } from '@/app/app/page'

View File

@@ -718,6 +718,9 @@ export function MapView({
if (!m) return
setIsMapLoaded(true)
// Guard: skip if sources already exist (React strict mode double-mount)
if (m.getSource('draw-features')) return
// Drawing features source
m.addSource('draw-features', {
type: 'geojson',
@@ -2028,14 +2031,14 @@ export function MapView({
const startW = selectedSymbolRef.current.resizeStartWidth || 1
const startScale = selectedSymbolRef.current.resizeStartScale || 1
const ratio = width / startW
selectedSymbolRef.current.scale = Math.max(0.5, Math.min(5, startScale * ratio))
selectedSymbolRef.current.scale = Math.max(0.2, Math.min(10, startScale * ratio))
selectedSymbolRef.current.innerEl.style.fontSize = `${baseFontSize * selectedSymbolRef.current.scale}px`
} else {
// For symbols: resize wrapper
selectedSymbolRef.current.wrapperEl.style.width = `${width}px`
selectedSymbolRef.current.wrapperEl.style.height = `${height}px`
const baseSize = 32
selectedSymbolRef.current.scale = Math.max(0.3, Math.min(4, width / baseSize))
selectedSymbolRef.current.scale = Math.max(0.1, Math.min(10, width / baseSize))
}
}
}}