diff --git a/deploy/deploy.sh b/deploy/deploy.sh index 8119c88357a2b0cbd9d2767a3c4394f522492f59..9fa0a71ffb3df6860f8cf5554c112ad2e6643ea4 100755 --- a/deploy/deploy.sh +++ b/deploy/deploy.sh @@ -11,12 +11,12 @@ else FOLDER="./data/" fi if [ $# -ge 3 ]; then - BRANCH=$2 + BRANCH=$3 else BRANCH="master" fi if [ $# -ge 4 ]; then - USER=$3 + USER=$4 else USER="core" fi @@ -30,7 +30,7 @@ echo "Infrastructure branch is $BRANCH" echo "Remote user is $USER" echo "Default site is $DEFAULTSITE" -scp $FOLDER $USER@$SERVER:/data +scp -r $FOLDER $USER@$SERVER:/data scp ./deploy/onServer.sh $USER@$SERVER: ssh $USER@$SERVER sudo mkdir -p /var/lib/coreos-install/ scp cloud-config $USER@$SERVER:/var/lib/coreos-install/user_data diff --git a/doc/deploying-a-server.md b/doc/deploying-a-server.md index 124365b53f42d3e513758269ec4b9b3f17e5a7e7..11780e450331358d6c985bb1aed0a08451cd7d59 100644 --- a/doc/deploying-a-server.md +++ b/doc/deploying-a-server.md @@ -11,10 +11,11 @@ Make sure you read [getting started](getting-started-as-a-hoster.md) first. * Give the new server a name (in this example, we call the server 'k3') * Add k3 to your /etc/hosts with the right IP address * If you have used this name before, run `./deploy/forget-server-fingerprint.sh k3` -* From the root folder of this repository, run `sh ./deploy/deploy.sh k3 ./data/` (where `./data/` should contain `server-wide/postfix/` +* From the root folder of this repository, run `sh ./deploy/deploy.sh k3 ./data/ master root` (where `./data/` should contain + `server-wide/postfix/` and `server-wide/haproxy/approved-certs/`; see the existing folder `data/` in this repo for an example of what the email forwards and TLS certificate files should look like). -* This will ask for the ssh password once; the rest should be automatic! +* The rest should be automatic! ### Adding a website to your server * For each site you want to deploy on the server, e.g. example.com, do the following: