Commit Graph

14 Commits

Author SHA1 Message Date
marco370
7c9ba798ed Update deployment script to use npm commands for builds
Modify deploy.sh to utilize `npm run build` and `npm run db:push` for frontend builds and database migrations, and simplify PM2 process management.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 42d8028a-fa71-4ec2-938c-e43eedf7df01
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/6d543d2c-20b9-4ea6-93fe-70fe9b1d9f80/42d8028a-fa71-4ec2-938c-e43eedf7df01/AwjfjCW
2025-10-16 15:38:12 +00:00
marco370
12e1efaa3d Update deployment script to use local binaries for build tools
Modify deploy.sh to use local npm package binaries for Vite and Drizzle Kit, and update ecosystem.config.js to use ES Module export syntax.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 42d8028a-fa71-4ec2-938c-e43eedf7df01
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/6d543d2c-20b9-4ea6-93fe-70fe9b1d9f80/42d8028a-fa71-4ec2-938c-e43eedf7df01/AwjfjCW
2025-10-16 15:34:32 +00:00
marco370
088ec72ddc Improve deployment script to handle database backups and application restarts
Update deploy.sh to include database backup, dependency installation, Vite build, Drizzle schema push, and PM2 application restart with rollback functionality.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 42d8028a-fa71-4ec2-938c-e43eedf7df01
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/6d543d2c-20b9-4ea6-93fe-70fe9b1d9f80/42d8028a-fa71-4ec2-938c-e43eedf7df01/AwjfjCW
2025-10-16 15:31:17 +00:00
marco370
a92b7a5096 Improve deployment process to handle environment variables and schema updates
Update the deployment script to correctly load environment variables for PM2, ensuring proper configuration for database connections and other runtime settings. This also includes ensuring that database schema migrations are pushed to the database using `drizzle-kit push --force` during deployment.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 42d8028a-fa71-4ec2-938c-e43eedf7df01
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/6d543d2c-20b9-4ea6-93fe-70fe9b1d9f80/42d8028a-fa71-4ec2-938c-e43eedf7df01/AwjfjCW
2025-10-16 15:24:36 +00:00
marco370
62f3593624 Update deployment script to improve application restart and database schema handling
Modify deploy.sh to correctly use drizzle-kit for database migrations, load .env variables for PM2, and integrate with ecosystem.config.js for application management.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 42d8028a-fa71-4ec2-938c-e43eedf7df01
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/6d543d2c-20b9-4ea6-93fe-70fe9b1d9f80/42d8028a-fa71-4ec2-938c-e43eedf7df01/eg9yHD6
2025-10-16 15:19:35 +00:00
marco370
64e58f2612 Update deployment script to retain development dependencies for production runtime
Modify deploy.sh to prevent `npm prune --production`, as Vite is required at runtime for Express to serve the frontend in production.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 42d8028a-fa71-4ec2-938c-e43eedf7df01
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/6d543d2c-20b9-4ea6-93fe-70fe9b1d9f80/42d8028a-fa71-4ec2-938c-e43eedf7df01/eg9yHD6
2025-10-16 14:26:12 +00:00
marco370
0fe3a51887 Improve application restart process by robustly locating PM2
Add logic to reliably find and use the PM2 executable for application restarts, ensuring consistency across different environments.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 42d8028a-fa71-4ec2-938c-e43eedf7df01
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/6d543d2c-20b9-4ea6-93fe-70fe9b1d9f80/42d8028a-fa71-4ec2-938c-e43eedf7df01/eg9yHD6
2025-10-16 14:21:26 +00:00
marco370
729850fbc6 Improve database backup and restore process for deployment
Update deploy script to correctly source .env file, handle missing DB variables, and use --dbname for pg_dump/psql commands.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 42d8028a-fa71-4ec2-938c-e43eedf7df01
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/6d543d2c-20b9-4ea6-93fe-70fe9b1d9f80/42d8028a-fa71-4ec2-938c-e43eedf7df01/eg9yHD6
2025-10-16 14:08:47 +00:00
Marco Lanzara
fe0a3e382e Merge branch 'main' of https://git.alfacom.it/marco/VigilanzaTurni 2025-10-16 13:37:16 +00:00
marco370
a40b945c84 Update deployment to securely manage database passwords
Securely manage PostgreSQL credentials by storing them in a dedicated file and updating deployment scripts to reference this file, removing hardcoded passwords from configuration and documentation.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 42d8028a-fa71-4ec2-938c-e43eedf7df01
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/6d543d2c-20b9-4ea6-93fe-70fe9b1d9f80/42d8028a-fa71-4ec2-938c-e43eedf7df01/aazyBOE
2025-10-16 11:00:27 +00:00
marco370
a7df004348 Update deployment scripts and server setup for automatic deployment and database backup
Update deploy scripts to include database backup and restore functionality, configure Nginx for vt.alfacom.it, and modify server setup to use the provided database password.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 42d8028a-fa71-4ec2-938c-e43eedf7df01
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
2025-10-16 10:54:16 +00:00
94bec4cfd6 Update deploy/setup-server.sh 2025-10-16 04:18:35 -04:00
marco370
3cdc6931bb Improve deployment process by generating secure passwords
Update deployment scripts to automatically generate secure PostgreSQL passwords, store them securely, and use them in environment configuration.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 99f0fce6-9386-489a-9632-1d81223cab44
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/6d543d2c-20b9-4ea6-93fe-70fe9b1d9f80/99f0fce6-9386-489a-9632-1d81223cab44/H8Wilyj
2025-10-16 07:15:54 +00:00
marco370
5a51a65218 Add deployment guide and scripts for automated server setup and deployment
Adds a comprehensive DEPLOYMENT.md guide, a setup-server.sh script for AlmaLinux 9 to install Node.js, PostgreSQL, Nginx, and PM2, a deploy.sh script for CI/CD deployment, an nginx.conf for server configuration, and a push-to-gitlab.sh helper script for Replit integration.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 99f0fce6-9386-489a-9632-1d81223cab44
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/6d543d2c-20b9-4ea6-93fe-70fe9b1d9f80/99f0fce6-9386-489a-9632-1d81223cab44/H8Wilyj
2025-10-16 07:12:27 +00:00