- Add QRCode component using qrcode.react (SVG-based, H error correction) - Add QRScanner component using html5-qrcode for camera-based scanning - Update Receive page with real QR code and payment request amount - Update Send page with QR scan button to auto-fill recipient address - Support Synor payment URI format: synor:address?amount=X - Add Dockerfile for web wallet with nginx serving - Add web-wallet service to docker-compose.testnet.yml (port 17300) - Fix TypeScript WebCrypto ArrayBuffer type issues QR features: - SVG rendering for crisp display at any size - Error correction level H (30% recovery) for printed codes - Camera permission handling with user-friendly error states - Auto-fill amount when scanning payment requests
39 lines
843 B
Docker
39 lines
843 B
Docker
# Dockerfile for Synor Web Wallet
|
|
# Multi-stage build for optimized production image
|
|
|
|
# Stage 1: Build
|
|
FROM node:20-alpine AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
# Install dependencies
|
|
COPY package.json ./
|
|
RUN npm install
|
|
|
|
# Copy source and build
|
|
COPY . .
|
|
RUN npm run build
|
|
|
|
# Stage 2: Serve with nginx
|
|
FROM nginx:alpine AS production
|
|
|
|
# Copy build output
|
|
COPY --from=builder /app/dist /usr/share/nginx/html
|
|
|
|
# Copy custom nginx config for SPA routing
|
|
RUN echo 'server { \
|
|
listen 80; \
|
|
root /usr/share/nginx/html; \
|
|
index index.html; \
|
|
location / { \
|
|
try_files $uri $uri/ /index.html; \
|
|
} \
|
|
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2)$ { \
|
|
expires 1y; \
|
|
add_header Cache-Control "public, immutable"; \
|
|
} \
|
|
}' > /etc/nginx/conf.d/default.conf
|
|
|
|
EXPOSE 80
|
|
|
|
CMD ["nginx", "-g", "daemon off;"]
|