splitted vhost, added gitbarerepo creation

This commit is contained in:
Bachir Soussi Chiadmi
2018-04-07 12:27:55 +02:00
parent e15e231cc5
commit 6e5433b041
10 changed files with 168 additions and 109 deletions

25
assets/deploy-drupal.sh Executable file
View File

@@ -0,0 +1,25 @@
#!/bin/bash
echo "updating drupal 8"
echo "Switching to project docroot."
cd ./public_html
echo ""
echo "Pulling down latest code."
git pull --ff-only origin prod
echo ""
echo "Clearing drush caches."
drush cache-clear drush
echo ""
echo "Composer install."
composer install --no-dev
echo ""
echo "Running database updates."
drush updb -y
echo ""
echo "Importing configuration."
drush config-import -y
echo ""
echo "Clearing caches."
drush cr
echo ""
echo "Deployment complete."

10
assets/deploy-simple.sh Normal file
View File

@@ -0,0 +1,10 @@
#!/bin/bash
echo "updating"
echo "Switching to project docroot."
cd ./public_html
echo ""
echo "Pulling down latest code."
git pull --ff-only origin prod
echo ""
echo "Deployment complete."

View File

@@ -10,9 +10,11 @@ if [ $refname = "refs/heads/prod" ]; then
unset GIT_DIR
cd ~
cd $PRODDIR
git pull --ff-only origin prod
# git pull --ff-only origin prod
# run deploy script instead
. deploy.sh
echo $?
echo "====== OK ====="
else
echo "Warning Commit not deployed, please use prod branch"
fi
fi

View File

@@ -1,6 +1,7 @@
#!/bin/bash
#hook/pre-receive
#CONFIG
PRODDIR="www"
read oldrev newrev refname
@@ -14,4 +15,4 @@ if [ $refname = "refs/heads/prod" ]; then
echo "====== OK ====="
else
echo "Warning Commit not deployed, please use prod branch"
fi
fi

View File

@@ -4,6 +4,7 @@
[SSH]
sequence = 7000,8000,9000
seq_timeout = 5
# TODO do not limit port 22 to the ip as it don't work with 4G connection
start_command = ufw allow from %IP% to any port 22
tcpflags = syn
cmd_timeout = 10