forked from BustByte/coronastatus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy-prod-all.sh
executable file
·39 lines (32 loc) · 936 Bytes
/
deploy-prod-all.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env bash
# Do not proceed if a deployment fails.
set -e
# All the coronastatus sites that are hosted on DO.
declare -a HOSTS=(
'coronastatus.es'
'coronastatus.co'
'coronastatus.fr'
'coronastatus.mx'
'coronastatus.us'
'coronastatus.org.ua'
'coronastatusau.org'
'coronastatusmt.com'
'coronastatus.it'
'coronastatus.pt'
# Ready, but nameservers not yet pointed to DigitalOcean
# 'coronastatus.ng'
# Adriaan told med to wait with deploying NL.
# 'coronastatus.nl'
# Deploy script is a little differnt for the Norwegian site.
# 'coronastatus.no'
# These sites are not hosted with us.
# 'coronastatus.sk'
# 'coronastatus.dk'
);
# Deploy procedure over ssh.
DEPLOY_COMMAND='cd /srv/scripts && ./deploy-prod.sh'
for HOST in "${HOSTS[@]}"; do
echo "> Deploying to ${HOST}:";
ssh "app@${HOST}" $DEPLOY_COMMAND;
echo "> Finished deploying to ${HOST}.";
done