build: add script to deploy backend server

This commit is contained in:
Miodec 2023-08-11 14:22:06 +02:00
parent 17cfb2ad7b
commit a4827f2d72
2 changed files with 16 additions and 1 deletions

11
bin/deployBackend.sh Executable file
View file

@ -0,0 +1,11 @@
#!/bin/bash
source .env
echo "Deploying backend to $BE_HOST with script $BE_SCRIPT_PATH"
# Connect to SSH and execute remote script
ssh_output=$(ssh "$BE_USER@$BE_HOST" "$BE_SCRIPT_PATH")
# Print the output
echo "Remote script output:"
echo "$ssh_output"

View file

@ -1,2 +1,6 @@
CF_ZONE_ID= #cloudflare zone id
CF_API_KEY= #cloudflare api key
CF_API_KEY= #cloudflare api key
BE_HOST= #backend host
BE_USER= #backend user
BE_SCRIPT_PATH= #backend deploy script path