diff --git a/Dockerfile b/Dockerfile index 61fc679..d07425f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -44,7 +44,7 @@ RUN mkdir -p /app/backups /app/logs /app/data && \ COPY --from=builder --chown=regisflow:nodejs /build/package*.json ./ COPY --from=builder --chown=regisflow:nodejs /build/dist ./dist COPY --from=builder --chown=regisflow:nodejs /build/shared ./shared -COPY --from=builder --chown=regisflow:nodejs /build/server/prod-start.js ./server/ + COPY --from=builder --chown=regisflow:nodejs /build/drizzle.config.ts ./ COPY --from=builder --chown=regisflow:nodejs /build/node_modules ./node_modules COPY --from=builder --chown=regisflow:nodejs /build/init.sql ./ diff --git a/attached_assets/image_1752413108822.png b/attached_assets/image_1752413108822.png new file mode 100644 index 0000000..5ffc27d Binary files /dev/null and b/attached_assets/image_1752413108822.png differ diff --git a/docker-entrypoint-simple.sh b/docker-entrypoint-simple.sh old mode 100755 new mode 100644 index b652946..debcbdf --- a/docker-entrypoint-simple.sh +++ b/docker-entrypoint-simple.sh @@ -51,9 +51,9 @@ fi echo "✅ Base de données configurée" -# Démarrer l'application avec le script de polyfill Node.js 18 +# Démarrer l'application echo "🎯 Démarrage de RegisFlow..." export NODE_ENV=production export PORT=5000 cd /app -exec node server/prod-start.js \ No newline at end of file +exec node dist/index.js \ No newline at end of file diff --git a/replit.md b/replit.md index 72d8a4d..1a13ead 100644 --- a/replit.md +++ b/replit.md @@ -312,16 +312,13 @@ Preferred communication style: Simple, everyday language. - ✅ Streamlined project structure with only essential files - ✅ Configured to use nginx_default network for reverse proxy integration -### Node.js 18 Compatibility Fix (January 9, 2025) -- ✅ Resolved TypeError with undefined paths in Node.js 18 production environment -- ✅ Fixed import.meta.dirname compatibility issue in Docker containers -- ✅ Created server/prod-start.js script that replaces import.meta.dirname with static values -- ✅ Modified docker-entrypoint-simple.sh to use compatibility script -- ✅ Script dynamically patches dist/index.js to replace undefined references -- ✅ Added proper environment variables for production Docker deployment -- ✅ Maintained existing vite.ts configuration without breaking changes -- ✅ Created comprehensive Docker test guide with troubleshooting steps -- ✅ Production-ready solution that works with Node.js 18 in Docker containers +### Docker Production Issues & Resolution (January 13, 2025) +- ✅ Resolved cache corruption errors during Docker deployment +- ✅ Fixed missing prod-start.js references in Dockerfile and entrypoint scripts +- ✅ Simplified Docker build process to use dist/index.js directly +- ✅ Eliminated temporary compatibility scripts after project cleanup +- ✅ Streamlined production deployment with standard Node.js execution +- ✅ Production-ready Docker configuration without custom polyfills ### Docker Production Deployment Fix (January 9, 2025) - ✅ Fixed "relation 'users' does not exist" error by adding drizzle-kit to production dependencies