You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
816 B

3 years ago
#!/bin/bash
set -xe
source $(dirname $0)/rootdir.sh #set ROOTDIR
SERVER="ortem"
REMOTE_DIR=/srv/usrv
REMOTE_PATH=$SERVER:$REMOTE_DIR
RSYNC="rsync -arzh --progress"
ssh $SERVER mkdir -p $REMOTE_DIR/{release,deploy}
$RSYNC $ROOTDIR/release/u_server $REMOTE_PATH/release/u_server
3 years ago
$RSYNC $ROOTDIR/certs/server.{crt,key} $REMOTE_PATH/certs
$RSYNC $ROOTDIR/certs/ca.crt $REMOTE_PATH/certs
3 years ago
$RSYNC $ROOTDIR/migrations/ $REMOTE_PATH/migrations
$RSYNC $ROOTDIR/.env* $REMOTE_PATH/
$RSYNC $ROOTDIR/integration/docker-compose.yml $REMOTE_PATH/deploy/
$RSYNC $ROOTDIR/images/integration-tests/u_db* $REMOTE_PATH/deploy/
$RSYNC $ROOTDIR/images/integration-tests/u_server.Dockerfile $REMOTE_PATH/deploy/
$RSYNC $ROOTDIR/scripts/start_server.sh $REMOTE_PATH/start_server.sh
ssh $SERVER "cd $REMOTE_DIR/deploy && ./start_server.sh"