ServerKit is a lightweight, modern server control panel for managing web applications, databases, and services on your VPS or dedicated server. Built with Python/Flask backend and React frontend.
Python astracloudflarecontrol-panelcyberpaneldnsfablehosting-control-panelhosting-panelkimi-k3server-managementserverkitubuntu-web-panelwebserver
Optimize frontend Docker build and Vite config
Juan Denis93eccda09c89
diff --git a/frontend/.dockerignore b/frontend/.dockerignorenew file mode 100644index 00000000..46d6497f--- /dev/null+++ b/frontend/.dockerignore@@ -0,0 +1,10 @@+node_modules+dist+.git+.gitignore+*.md+.env*+.vscode+.idea+.DS_Store+Thumbs.dbdiff --git a/frontend/Dockerfile b/frontend/Dockerfileindex 4884a47e..3db7b0e4 100644--- a/frontend/Dockerfile+++ b/frontend/Dockerfile@@ -14,7 +14,7 @@ RUN npm ciCOPY . .# Build the application-RUN npm run build+RUN NODE_OPTIONS="--max-old-space-size=4096" npm run build# Stage 2: ProductionFROM nginx:alpinediff --git a/frontend/vite.config.js b/frontend/vite.config.jsindex 848cb8fd..c483b80a 100644--- a/frontend/vite.config.js+++ b/frontend/vite.config.js@@ -11,4 +11,17 @@ export default defineConfig({interval: 1000,},},+ build: {+ rollupOptions: {+ output: {+ manualChunks: {+ 'vendor-react': ['react', 'react-dom', 'react-router-dom'],+ 'vendor-charts': ['recharts'],+ 'vendor-flow': ['@xyflow/react'],+ 'vendor-xterm': ['@xterm/xterm', '@xterm/addon-fit', '@xterm/addon-web-links'],+ 'vendor-icons': ['lucide-react'],+ },+ },+ },+ },})diff --git a/install.sh b/install.shindex ce21d02c..f44ccdc9 100644--- a/install.sh+++ b/install.sh@@ -244,12 +244,12 @@ print_success "Nginx proxy configured"# Clean up Docker networks to prevent issuesprint_info "Cleaning up Docker..."docker network prune -f 2>/dev/null || true-docker system prune -f 2>/dev/null || true+docker container prune -f 2>/dev/null || true# Build and start frontend containerprint_info "Building frontend container..."cd "$INSTALL_DIR"-docker compose build --no-cache+docker compose buildprint_info "Starting services..."