synor/apps/web/Dockerfile
Gulshan Yadav fd7f6446ea feat(web-wallet): add hardware wallet support (Ledger/Trezor)
- Add hardware-wallet.ts with Ledger and Trezor integration
- Create HardwareWalletConnect.tsx component for wallet selection UI
- Add Hardware Wallet section to Settings page
- Support WebHID transport for Ledger (Nano S/X/S Plus)
- Support Trezor Connect for Trezor Model T/One
- Implement hybrid signature flow for hardware wallets:
  - Ed25519 signed on hardware device (key never leaves device)
  - Dilithium3 requested from server (for post-quantum protection)

Dependencies added:
- @ledgerhq/hw-transport-webhid: WebHID transport for Ledger
- @trezor/connect-web: Trezor Connect integration

Note: Hardware wallets don't support Dilithium3 yet, so the hybrid
signature scheme uses server-side Dilithium signing with Ed25519 proof.
2026-01-10 06:03:24 +05:30

42 lines
1 KiB
Docker

# Dockerfile for Synor Web Wallet
# Multi-stage build for optimized production image
# Stage 1: Build
FROM node:20-alpine AS builder
# Install build dependencies for native modules (usb, etc.)
RUN apk add --no-cache python3 make g++ linux-headers eudev-dev libusb-dev
WORKDIR /app
# Install dependencies (--ignore-optional for problematic native deps)
COPY package.json ./
RUN npm install --ignore-optional || 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;"]