mirror of
https://github.com/R0m1k3/Regisflow.git
synced 2026-10-22 22:58:16 +02:00
Ensure the application runs correctly in the production environment
Fixes `import.meta.dirname` issue in Node.js 18 by patching `/app/dist/index.js` with `sed` in `docker-entrypoint-simple.sh`. Replit-Commit-Author: Agent Replit-Commit-Session-Id: e80fed01-7137-4997-b9af-dad57132d430 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/0715008c-7244-40f4-befc-26c014852236/db75d429-4075-4348-b179-bb283fb6d9d3.jpg
This commit is contained in:
1 parent
5048b3b466
commit
54595e75df
2 files changed
+13
-2
No files matched your search
@@ -51,6 +51,16 @@ fi
|
|||||||
|
|
||||||
echo "✅ Base de données configurée"
|
echo "✅ Base de données configurée"
|
||||||
|
|
||||||
|
# Corriger le problème import.meta.dirname pour Node.js 18
|
||||||
|
echo "🔧 Application du patch Node.js 18..."
|
||||||
|
if [ -f "/app/dist/index.js" ]; then
|
||||||
|
# Remplacer import.meta.dirname par "/app" (chemin fixe en production)
|
||||||
|
sed -i 's/import\.meta\.dirname/\"\/app\"/g' /app/dist/index.js
|
||||||
|
echo "✅ Patch appliqué avec succès"
|
||||||
|
else
|
||||||
|
echo "⚠️ Fichier dist/index.js non trouvé"
|
||||||
|
fi
|
||||||
|
|
||||||
# Démarrer l'application
|
# Démarrer l'application
|
||||||
echo "🎯 Démarrage de RegisFlow..."
|
echo "🎯 Démarrage de RegisFlow..."
|
||||||
export NODE_ENV=production
|
export NODE_ENV=production
|
||||||
|
|||||||
@@ -317,8 +317,9 @@ Preferred communication style: Simple, everyday language.
|
|||||||
- ✅ Fixed missing prod-start.js references in Dockerfile and entrypoint scripts
|
- ✅ Fixed missing prod-start.js references in Dockerfile and entrypoint scripts
|
||||||
- ✅ Simplified Docker build process to use dist/index.js directly
|
- ✅ Simplified Docker build process to use dist/index.js directly
|
||||||
- ✅ Eliminated temporary compatibility scripts after project cleanup
|
- ✅ Eliminated temporary compatibility scripts after project cleanup
|
||||||
- ✅ Streamlined production deployment with standard Node.js execution
|
- ✅ Fixed Node.js 18 import.meta.dirname undefined error with automatic patching
|
||||||
- ✅ Production-ready Docker configuration without custom polyfills
|
- ✅ Added sed-based patch in docker-entrypoint-simple.sh for production compatibility
|
||||||
|
- ✅ Production-ready Docker configuration with Node.js 18 compatibility
|
||||||
|
|
||||||
### Docker Production Deployment Fix (January 9, 2025)
|
### Docker Production Deployment Fix (January 9, 2025)
|
||||||
- ✅ Fixed "relation 'users' does not exist" error by adding drizzle-kit to production dependencies
|
- ✅ Fixed "relation 'users' does not exist" error by adding drizzle-kit to production dependencies
|
||||||
|
|||||||
Reference in new issue
Block a user