Add development configuration for marketing service in Docker and update frontend scripts

This commit is contained in:
IGNY8 VPS (Salman)
2025-11-13 16:13:13 +00:00
parent ad9aba87d7
commit 5f5d1c91a8
8 changed files with 333 additions and 20 deletions

View File

@@ -0,0 +1,20 @@
# Marketing Development Dockerfile - Vite Dev Server with Hot Reload
FROM node:18-alpine
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install dependencies
RUN npm install
# Copy source code (will be mounted as volume, but needed for initial setup)
COPY . .
# Expose Vite dev server port
EXPOSE 5174
# Start Vite dev server for marketing site
CMD ["npm", "run", "dev:marketing"]

View File

@@ -7,91 +7,91 @@
"clsx": {
"src": "../../clsx/dist/clsx.mjs",
"file": "clsx.js",
"fileHash": "612eb115",
"fileHash": "335e755e",
"needsInterop": false
},
"tailwind-merge": {
"src": "../../tailwind-merge/dist/bundle-mjs.mjs",
"file": "tailwind-merge.js",
"fileHash": "fae71fe8",
"fileHash": "ba411a67",
"needsInterop": false
},
"zustand": {
"src": "../../zustand/esm/index.mjs",
"file": "zustand.js",
"fileHash": "66812e04",
"fileHash": "01c7a42f",
"needsInterop": false
},
"apexcharts": {
"src": "../../apexcharts/dist/apexcharts.esm.js",
"file": "apexcharts.js",
"fileHash": "abf4aac5",
"fileHash": "95f9f7ed",
"needsInterop": false
},
"react-apexcharts": {
"src": "../../react-apexcharts/dist/react-apexcharts.min.js",
"file": "react-apexcharts.js",
"fileHash": "f52d726c",
"fileHash": "c6ad3fcf",
"needsInterop": true
},
"react": {
"src": "../../react/index.js",
"file": "react.js",
"fileHash": "7e35b58a",
"fileHash": "552f8751",
"needsInterop": true
},
"react-dom": {
"src": "../../react-dom/index.js",
"file": "react-dom.js",
"fileHash": "dfafaab1",
"fileHash": "51ab02f8",
"needsInterop": true
},
"react/jsx-dev-runtime": {
"src": "../../react/jsx-dev-runtime.js",
"file": "react_jsx-dev-runtime.js",
"fileHash": "b406d5db",
"fileHash": "3eac29f9",
"needsInterop": true
},
"react/jsx-runtime": {
"src": "../../react/jsx-runtime.js",
"file": "react_jsx-runtime.js",
"fileHash": "dd354b52",
"fileHash": "f475eb11",
"needsInterop": true
},
"@heroicons/react/24/outline": {
"src": "../../@heroicons/react/24/outline/esm/index.js",
"file": "@heroicons_react_24_outline.js",
"fileHash": "1527a1b7",
"fileHash": "1384c9cc",
"needsInterop": false
},
"react-dom/client": {
"src": "../../react-dom/client.js",
"file": "react-dom_client.js",
"fileHash": "f8ebcf66",
"fileHash": "7f1e08f7",
"needsInterop": true
},
"react-helmet-async": {
"src": "../../react-helmet-async/lib/index.esm.js",
"file": "react-helmet-async.js",
"fileHash": "67572141",
"fileHash": "dbe6d36e",
"needsInterop": false
},
"react-router": {
"src": "../../react-router/dist/development/index.mjs",
"file": "react-router.js",
"fileHash": "10c21415",
"fileHash": "87eba0c4",
"needsInterop": false
},
"react-router-dom": {
"src": "../../react-router-dom/dist/index.mjs",
"file": "react-router-dom.js",
"fileHash": "c3e017b5",
"fileHash": "719445bb",
"needsInterop": false
},
"zustand/middleware": {
"src": "../../zustand/esm/middleware.mjs",
"file": "zustand_middleware.js",
"fileHash": "ba8cc813",
"fileHash": "4c1c6b84",
"needsInterop": false
}
},

View File

@@ -5,6 +5,7 @@
"type": "module",
"scripts": {
"dev": "vite",
"dev:marketing": "vite --host 0.0.0.0 --port 5174 --force marketing.html",
"build": "vite build",
"build:marketing": "vite build --mode marketing",
"build:check": "tsc -b && vite build",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 351 KiB

After

Width:  |  Height:  |  Size: 363 KiB

View File

@@ -83,10 +83,11 @@ export default defineConfig(({ mode }) => {
...(isDev && {
server: {
host: "0.0.0.0", // Allow external connections (for Docker)
port: 5173,
strictPort: false, // Allow port fallback if 5173 is busy
port: isMarketingBuild ? 5174 : 5173, // Different port for marketing dev
strictPort: false, // Allow port fallback if port is busy
allowedHosts: [
"app.igny8.com",
"igny8.com",
"localhost",
"127.0.0.1",
],
@@ -95,11 +96,11 @@ export default defineConfig(({ mode }) => {
},
hmr: {
// Behind reverse proxy - use same origin strategy
// Client connects via public domain (app.igny8.com) on default HTTPS port (443)
// Caddy automatically proxies WebSocket upgrades from 443 to 5173
// Client connects via public domain on default HTTPS port (443)
// Caddy automatically proxies WebSocket upgrades from 443 to dev port
protocol: "wss",
// Don't specify host/port - Vite will use same origin as page
// This ensures client connects to wss://app.igny8.com (port 443 implicit)
// This ensures client connects to wss://domain.com (port 443 implicit)
},
// Increase timeout for slow connections and dependency pre-bundling
timeout: 120000, // 120 seconds (2 minutes) to match Caddy timeout