mirror of
https://github.com/R0m1k3/Regisflow.git
synced 2026-10-23 15:18:17 +02:00
Ensure website content displays correctly when running in production mode
Fixes a static asset serving issue by updating the Dockerfile to copy public assets. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 91318273-c764-4fd4-be04-bdc12c38af32 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/0715008c-7244-40f4-befc-26c014852236/1a628c74-3aad-4182-a42f-aeae036e6dcf.jpg
This commit is contained in:
1 parent
4c89a7e2e5
commit
1ee5972c47
3 files changed
+102
No files matched your search
@@ -48,6 +48,9 @@ COPY --from=builder --chown=regisflow:nodejs /build/server/prod-start.js ./serve
|
|||||||
COPY --from=builder --chown=regisflow:nodejs /build/drizzle.config.ts ./
|
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/node_modules ./node_modules
|
||||||
|
|
||||||
|
# Copier les assets client au bon endroit pour serveStatic
|
||||||
|
COPY --from=builder --chown=regisflow:nodejs /build/dist/public ./public
|
||||||
|
|
||||||
# Les dépendances sont déjà copiées depuis le builder
|
# Les dépendances sont déjà copiées depuis le builder
|
||||||
# Nettoyer le cache npm uniquement
|
# Nettoyer le cache npm uniquement
|
||||||
RUN npm cache clean --force && \
|
RUN npm cache clean --force && \
|
||||||
|
|||||||
@@ -0,0 +1,91 @@
|
|||||||
|
at file:///app/dist/index.js:1081:5
|
||||||
|
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
|
||||||
|
Node.js v18.20.8
|
||||||
|
🚀 Démarrage de RegisFlow (mode simplifié)...
|
||||||
|
📡 Attente de la base de données...
|
||||||
|
✅ PostgreSQL prêt!
|
||||||
|
📦 Création des tables de la base de données...
|
||||||
|
Reading config file '/app/drizzle.config.ts'
|
||||||
|
Using 'pg' driver for database querying
|
||||||
|
[⣷] Pulling schema from database...
|
||||||
|
[⣯] Pulling schema from database...
|
||||||
|
[✓] Pulling schema from database...
|
||||||
|
[i] No changes detected
|
||||||
|
✅ Tables créées avec succès
|
||||||
|
✅ Base de données configurée
|
||||||
|
🎯 Démarrage de RegisFlow...
|
||||||
|
✅ Node.js 18 compatibility fix applied
|
||||||
|
file:///app/dist/index.js:1032
|
||||||
|
throw new Error(
|
||||||
|
^
|
||||||
|
Error: Could not find the build directory: /app/public, make sure to build the client first
|
||||||
|
at serveStatic (file:///app/dist/index.js:1032:11)
|
||||||
|
at file:///app/dist/index.js:1081:5
|
||||||
|
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
|
||||||
|
Node.js v18.20.8
|
||||||
|
🚀 Démarrage de RegisFlow (mode simplifié)...
|
||||||
|
📡 Attente de la base de données...
|
||||||
|
✅ PostgreSQL prêt!
|
||||||
|
📦 Création des tables de la base de données...
|
||||||
|
Reading config file '/app/drizzle.config.ts'
|
||||||
|
Using 'pg' driver for database querying
|
||||||
|
[⣷] Pulling schema from database...
|
||||||
|
[⣯] Pulling schema from database...
|
||||||
|
[✓] Pulling schema from database...
|
||||||
|
[i] No changes detected
|
||||||
|
✅ Tables créées avec succès
|
||||||
|
✅ Base de données configurée
|
||||||
|
🎯 Démarrage de RegisFlow...
|
||||||
|
✅ Node.js 18 compatibility fix applied
|
||||||
|
file:///app/dist/index.js:1032
|
||||||
|
throw new Error(
|
||||||
|
^
|
||||||
|
Error: Could not find the build directory: /app/public, make sure to build the client first
|
||||||
|
at serveStatic (file:///app/dist/index.js:1032:11)
|
||||||
|
at file:///app/dist/index.js:1081:5
|
||||||
|
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
|
||||||
|
Node.js v18.20.8
|
||||||
|
🚀 Démarrage de RegisFlow (mode simplifié)...
|
||||||
|
📡 Attente de la base de données...
|
||||||
|
✅ PostgreSQL prêt!
|
||||||
|
📦 Création des tables de la base de données...
|
||||||
|
Reading config file '/app/drizzle.config.ts'
|
||||||
|
Using 'pg' driver for database querying
|
||||||
|
[⣷] Pulling schema from database...
|
||||||
|
[⣯] Pulling schema from database...
|
||||||
|
[✓] Pulling schema from database...
|
||||||
|
[i] No changes detected
|
||||||
|
✅ Tables créées avec succès
|
||||||
|
✅ Base de données configurée
|
||||||
|
🎯 Démarrage de RegisFlow...
|
||||||
|
✅ Node.js 18 compatibility fix applied
|
||||||
|
file:///app/dist/index.js:1032
|
||||||
|
throw new Error(
|
||||||
|
^
|
||||||
|
Error: Could not find the build directory: /app/public, make sure to build the client first
|
||||||
|
at serveStatic (file:///app/dist/index.js:1032:11)
|
||||||
|
at file:///app/dist/index.js:1081:5
|
||||||
|
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
|
||||||
|
Node.js v18.20.8
|
||||||
|
🚀 Démarrage de RegisFlow (mode simplifié)...
|
||||||
|
📡 Attente de la base de données...
|
||||||
|
✅ PostgreSQL prêt!
|
||||||
|
📦 Création des tables de la base de données...
|
||||||
|
Reading config file '/app/drizzle.config.ts'
|
||||||
|
Using 'pg' driver for database querying
|
||||||
|
[⣷] Pulling schema from database...
|
||||||
|
[⣯] Pulling schema from database...
|
||||||
|
[✓] Pulling schema from database...
|
||||||
|
[i] No changes detected
|
||||||
|
✅ Tables créées avec succès
|
||||||
|
✅ Base de données configurée
|
||||||
|
🎯 Démarrage de RegisFlow...
|
||||||
|
✅ Node.js 18 compatibility fix applied
|
||||||
|
file:///app/dist/index.js:1032
|
||||||
|
throw new Error(
|
||||||
|
^
|
||||||
|
Error: Could not find the build directory: /app/public, make sure to build the client first
|
||||||
|
at serveStatic (file:///app/dist/index.js:1032:11)
|
||||||
|
at file:///app/dist/index.js:1081:5
|
||||||
|
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
|
||||||
|
Node.js v18.20.8
|
||||||
@@ -231,6 +231,14 @@ Preferred communication style: Simple, everyday language.
|
|||||||
- ✅ Created comprehensive Docker test guide with troubleshooting steps
|
- ✅ Created comprehensive Docker test guide with troubleshooting steps
|
||||||
- ✅ Production-ready solution that works with Node.js 18 in Docker containers
|
- ✅ Production-ready solution that works with Node.js 18 in Docker containers
|
||||||
|
|
||||||
|
### Docker Production Deployment Fix (January 9, 2025)
|
||||||
|
- ✅ Fixed "relation 'users' does not exist" error by adding drizzle-kit to production dependencies
|
||||||
|
- ✅ Added automatic database migration in docker-entrypoint-simple.sh script
|
||||||
|
- ✅ Resolved "Could not find build directory /app/public" by copying assets to correct location
|
||||||
|
- ✅ Updated Dockerfile to copy dist/public to /app/public for serveStatic compatibility
|
||||||
|
- ✅ Database tables now created automatically on first container startup
|
||||||
|
- ✅ Complete Docker deployment package ready with all fixes applied
|
||||||
|
|
||||||
### Production Deployment System (January 9, 2025)
|
### Production Deployment System (January 9, 2025)
|
||||||
- ✅ Multi-stage Dockerfile optimized for production with security hardening
|
- ✅ Multi-stage Dockerfile optimized for production with security hardening
|
||||||
- ✅ Production-specific Docker Compose configuration with resource limits
|
- ✅ Production-specific Docker Compose configuration with resource limits
|
||||||
|
|||||||
Reference in new issue
Block a user