mirror of
https://github.com/jambonz/jambonz-infrastructure.git
synced 2026-01-25 02:08:27 +00:00
feature server packer: remove old .mp3 files periodically, build AMI with larger instance type for speed
This commit is contained in:
@@ -9,12 +9,15 @@ cd apps
|
||||
git clone https://github.com/jambonz/jambonz-feature-server.git -b ${VERSION}
|
||||
git clone https://github.com/jambonz/fsw-clear-old-calls.git
|
||||
|
||||
cd /home/admin/apps/jambonz-feature-server && npm install
|
||||
cd /home/admin/apps/jambonz-feature-server && sudo npm install --unsafe-perm
|
||||
cd /home/admin/apps/fsw-clear-old-calls && npm install && sudo npm install -g .
|
||||
|
||||
echo "0 * * * * root fsw-clear-old-calls --password JambonzR0ck$ >> /var/log/fsw-clear-old-calls.log 2>&1" | sudo tee -a /etc/crontab
|
||||
echo "0 * * * * root fsw-clear-old-calls --password JambonzR0ck$ >> /var/log/fsw-clear-old-calls.log 2>&1" | sudo tee -a /etc/crontab
|
||||
echo "0 1 * * * root find /tmp -name \"*.mp3\" -mtime +2 -exec rm {} \; > /dev/null 2>&1" | sudo tee -a /etc/crontab
|
||||
|
||||
sudo -u admin bash -c "pm2 install pm2-logrotate"
|
||||
sudo -u admin bash -c "pm2 set pm2-logrotate:max_size 1G"
|
||||
sudo -u admin bash -c "pm2 set pm2-logrotate:retain 5"
|
||||
sudo -u admin bash -c "pm2 set pm2-logrotate:compress true"
|
||||
|
||||
sudo chown -R admin:admin /home/admin/apps
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"region": "us-east-1",
|
||||
"ssh_username": "admin",
|
||||
"ami_description": "jambonz feature server",
|
||||
"instance_type": "t2.medium",
|
||||
"instance_type": "t2.xlarge",
|
||||
"drachtio_version": "develop",
|
||||
"jambonz_version": "master"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user