build
All checks were successful
Build & Deploy / deploy (push) Successful in 44s

This commit is contained in:
2026-01-16 12:51:29 +01:00
parent a40ce95a6a
commit 5e74605d2d
3 changed files with 11 additions and 15 deletions

View File

@@ -12,7 +12,7 @@ services:
- "traefik.http.routers.mb-grid-solutions.tls.certresolver=le"
- "traefik.http.services.mb-grid-solutions.loadbalancer.server.port=3000"
healthcheck:
test: ["CMD", "wget", "-q", "-O", "-", "http://localhost:3000/health"]
test: ["CMD", "node", "-e", "fetch('http://localhost:3000/health').then(r => r.ok ? process.exit(0) : process.exit(1)).catch(() => process.exit(1))"]
interval: 5s
timeout: 2s
retries: 10

View File

@@ -21,19 +21,12 @@
"license": "ISC",
"description": "",
"dependencies": {
"@vitejs/plugin-react-swc": "^3.11.0",
"cors": "^2.8.5",
"dotenv": "^17.2.3",
"express": "^5.2.1",
"express-rate-limit": "^8.2.1",
"framer-motion": "^12.26.2",
"helmet": "^8.1.0",
"lucide-react": "^0.562.0",
"nodemailer": "^7.0.12",
"react": "^19.2.3",
"react-dom": "^19.2.3",
"react-router-dom": "^7.12.0",
"vite": "^6.4.1"
"nodemailer": "^7.0.12"
},
"devDependencies": {
"@types/cors": "^2.8.19",
@@ -42,9 +35,16 @@
"@types/nodemailer": "^7.0.5",
"@types/react": "^19.2.8",
"@types/react-dom": "^19.2.3",
"@vitejs/plugin-react-swc": "^3.11.0",
"framer-motion": "^12.26.2",
"lucide-react": "^0.562.0",
"nodemon": "^3.1.11",
"react": "^19.2.3",
"react-dom": "^19.2.3",
"react-router-dom": "^7.12.0",
"ts-node": "^10.9.2",
"typescript": "^5.9.3",
"vite": "^6.4.1",
"vite-plugin-checker": "^0.12.0"
}
}

View File

@@ -1,6 +1,5 @@
import express from 'express';
import path from 'path';
import { fileURLToPath } from 'url';
import nodemailer from 'nodemailer';
import cors from 'cors';
import dotenv from 'dotenv';
@@ -9,9 +8,6 @@ import rateLimit from 'express-rate-limit';
dotenv.config();
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const app = express();
const PORT = process.env.PORT || 3000;
@@ -97,12 +93,12 @@ app.get('/health', (req, res) => {
});
// Serve static files from the React app
const distPath = path.join(__dirname, 'dist/frontend');
const distPath = path.join(process.cwd(), 'dist/frontend');
app.use(express.static(distPath));
// The "catchall" handler: for any request that doesn't
// match one above, send back React's index.html file.
app.get('*', (req, res) => {
app.get('(.*)', (req, res) => {
res.sendFile(path.join(distPath, 'index.html'));
});