- Add Dockerfile with multi-stage build (Node.js + Nginx) - Add docker-compose.yml for Portainer stack deployment on port 7777 - Add nginx.conf with PWA support, gzip compression, and security headers - Add .dockerignore for optimized Docker builds - Add DEPLOYMENT.md with comprehensive deployment guide - Configure Vite PWA plugin with service worker and offline support - Add PWA manifest.json with app icons and shortcuts - Enhance logo.svg with iOS-style glass effects (filters, gradients, highlights) - Add app-icon.svg for PWA installation - Update mobile nav with glassmorphic active tab styling - Fix mobile tab bar layout shift issues with flex-1 and consistent sizing - Update index.html with PWA meta tags and Apple-specific settings - Add health check endpoint at /health for container monitoring Co-authored-by: Cursor <cursoragent@cursor.com>
57 lines
1.5 KiB
TypeScript
57 lines
1.5 KiB
TypeScript
import { fileURLToPath, URL } from 'node:url'
|
|
import { defineConfig } from 'vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
import { VitePWA } from 'vite-plugin-pwa'
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
vue(),
|
|
VitePWA({
|
|
registerType: 'autoUpdate',
|
|
includeAssets: ['assets/images/app-icon.svg', 'assets/fonts/*.otf'],
|
|
manifest: {
|
|
name: 'IndeedHub - Decentralized Media Streaming',
|
|
short_name: 'IndeedHub',
|
|
description: 'Stream films and content on the decentralized web powered by Nostr and Bitcoin',
|
|
theme_color: '#0a0a0a',
|
|
background_color: '#0a0a0a',
|
|
display: 'standalone',
|
|
orientation: 'portrait-primary',
|
|
icons: [
|
|
{
|
|
src: '/assets/images/app-icon.svg',
|
|
sizes: '512x512',
|
|
type: 'image/svg+xml',
|
|
purpose: 'any maskable'
|
|
}
|
|
]
|
|
},
|
|
workbox: {
|
|
globPatterns: ['**/*.{js,css,html,ico,png,svg,jpg,jpeg,woff,woff2,otf}'],
|
|
runtimeCaching: [
|
|
{
|
|
urlPattern: /^https:\/\/images\.unsplash\.com\/.*/i,
|
|
handler: 'CacheFirst',
|
|
options: {
|
|
cacheName: 'unsplash-images-cache',
|
|
expiration: {
|
|
maxEntries: 50,
|
|
maxAgeSeconds: 60 * 60 * 24 * 30 // 30 days
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
})
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
'@': fileURLToPath(new URL('./src', import.meta.url))
|
|
}
|
|
},
|
|
server: {
|
|
port: 3000,
|
|
host: true
|
|
}
|
|
})
|