| Server IP : 3.147.158.171 / Your IP : 216.73.216.216 Web Server : Apache/2.4.67 (Amazon Linux) OpenSSL/3.5.5 System : Linux ip-172-31-2-178.us-east-2.compute.internal 6.1.172-216.329.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC Wed May 20 06:31:34 UTC 2026 x86_64 User : ec2-user ( 1000) PHP Version : 8.4.21 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /tsai/repo/builder/backend/configs/ |
Upload File : |
{
"name": "Deploy to Server",
"description": "Build locally, sync to server, and restart services",
"steps": [
{
"name": "Build Angular apps",
"step_type": "include",
"config": "build-angular.json",
"parameters": {
"PARAM_CONFIG_TYPE": "tsai"
},
"timeout": 900
},
{
"name": "Sync dist/tsai to server",
"step_type": "shell",
"command": "rsync -avz --delete-after --exclude='.git' --exclude='.DS_Store' -e 'ssh -i ${SSH_KEY}' ${BASE_DIR}chatbot/dist/tsai/ ${SSH_USER}@${SSH_HOST}:${CB_BUILD_DIR_REMOTE}",
"timeout": 300
},
{
"name": "Symlink WP apps in all WP sites on server",
"step_type": "shell",
"command": "ssh -i ${SSH_KEY} ${SSH_USER}@${SSH_HOST} 'for site in autosave demo.tsai.ai dev johnturman.net news sandbox tsai.ai tsai2; do mkdir -p ${BASE_DIR_REMOTE}sites/$site/wp-content/uploads/tsai && for app in banner sas player; do rm -rf ${BASE_DIR_REMOTE}sites/$site/wp-content/uploads/tsai/$app && ln -sfn ${CB_BUILD_DIR_REMOTE}wp-shared/$app ${BASE_DIR_REMOTE}sites/$site/wp-content/uploads/tsai/$app; done; done'",
"timeout": 120
},
{
"name": "Stop httpd service",
"step_type": "shell",
"command": "ssh -i ${SSH_KEY} ${SSH_USER}@${SSH_HOST} 'sudo systemctl stop httpd'",
"continue_on_failure": true,
"timeout": 60
},
{
"name": "Stop php-fpm service",
"step_type": "shell",
"command": "ssh -i ${SSH_KEY} ${SSH_USER}@${SSH_HOST} 'sudo systemctl stop php-fpm'",
"continue_on_failure": true,
"timeout": 60
},
{
"name": "Stop jpt-fastapi service",
"step_type": "shell",
"command": "ssh -i ${SSH_KEY} ${SSH_USER}@${SSH_HOST} 'sudo systemctl stop jpt-fastapi'",
"continue_on_failure": true,
"timeout": 60
},
{
"name": "Git pull main repo on server",
"step_type": "shell",
"command": "ssh -i ${SSH_KEY} ${SSH_USER}@${SSH_HOST} 'cd ${BASE_DIR_REMOTE} && git pull'",
"timeout": 120
},
{
"name": "Install Python dependencies",
"step_type": "shell",
"command": "ssh -i ${SSH_KEY} ${SSH_USER}@${SSH_HOST} '${BASE_DIR_REMOTE}api/venv/bin/pip install -r ${BASE_DIR_REMOTE}api/requirements.txt'",
"timeout": 120
},
{
"name": "Install/refresh systemd user timers",
"step_type": "shell",
"command": "ssh -i ${SSH_KEY} ${SSH_USER}@${SSH_HOST} 'bash ${BASE_DIR_REMOTE}api/cron/setup-timers.sh'",
"timeout": 60
},
{
"name": "Start jpt-fastapi service",
"step_type": "shell",
"command": "ssh -i ${SSH_KEY} ${SSH_USER}@${SSH_HOST} 'sudo systemctl start jpt-fastapi'",
"timeout": 60
},
{
"name": "Wait for API startup",
"step_type": "wait",
"timeout": 5
},
{
"name": "Start php-fpm service",
"step_type": "shell",
"command": "ssh -i ${SSH_KEY} ${SSH_USER}@${SSH_HOST} 'sudo systemctl start php-fpm'",
"timeout": 60
},
{
"name": "Start httpd service",
"step_type": "shell",
"command": "ssh -i ${SSH_KEY} ${SSH_USER}@${SSH_HOST} 'sudo systemctl start httpd'",
"timeout": 60
},
{
"name": "Verify services are running",
"step_type": "shell",
"command": "ssh -i ${SSH_KEY} ${SSH_USER}@${SSH_HOST} 'systemctl is-active httpd php-fpm jpt-fastapi'",
"timeout": 30
}
],
"stop_on_failure": true
}