2023-08-16 15:06:16 +02:00
|
|
|
# Script to start the production server
|
|
|
|
|
2023-08-17 16:47:54 +02:00
|
|
|
# Commit to the production branch
|
2023-08-24 14:57:36 +02:00
|
|
|
# git commit -am "Auto-trigger - Production server started" && git push origin Production
|
2023-08-17 16:47:54 +02:00
|
|
|
|
2023-09-21 19:55:14 +02:00
|
|
|
# backup database
|
2023-09-23 21:41:48 +02:00
|
|
|
# /usr/local/bin/python /home/nova-api/api/backup_manager/main.py pre_prodpush
|
2023-09-21 19:55:14 +02:00
|
|
|
|
2023-08-30 20:55:31 +02:00
|
|
|
# Kill production server
|
|
|
|
fuser -k 2333/tcp
|
|
|
|
|
|
|
|
# Clear production directory
|
|
|
|
rm -rf /home/nova-prod/*
|
|
|
|
|
2023-08-16 15:06:16 +02:00
|
|
|
# Copy files to production
|
|
|
|
cp -r * /home/nova-prod
|
|
|
|
|
2023-08-30 20:55:31 +02:00
|
|
|
# Copy .prod.env file to production
|
2023-08-16 15:06:16 +02:00
|
|
|
cp env/.prod.env /home/nova-prod/.env
|
|
|
|
|
|
|
|
# Change directory
|
|
|
|
cd /home/nova-prod
|
|
|
|
|
|
|
|
# Start screen
|
2023-08-23 23:28:38 +02:00
|
|
|
screen -S nova-api python run prod && sleep 5
|