Commit 02d7c0a0 authored by Egor Kremnev's avatar Egor Kremnev

fix scripts

parent 238c85b1
...@@ -19,6 +19,10 @@ LATEST_ARTIFACT_NAME=${2} ...@@ -19,6 +19,10 @@ LATEST_ARTIFACT_NAME=${2}
APPLICATION_ROOT_PATH=${3} APPLICATION_ROOT_PATH=${3}
VERSION=$(cat ${APPLICATION_ROOT_PATH}/VERSION) VERSION=$(cat ${APPLICATION_ROOT_PATH}/VERSION)
DB_PASSWORD_ENV=${4}
DB_USERNAME_ENV=${5}
DB_HOST_ENV=${6}
DB_PORT_ENV=${7}
PROJECT_ROOT=${APPLICATION_ROOT_PATH}/application PROJECT_ROOT=${APPLICATION_ROOT_PATH}/application
BACKUP_DIR=~/application_backups BACKUP_DIR=~/application_backups
......
...@@ -21,6 +21,8 @@ PATH_TO_SCRIPTS_DIR=${4}/scripts ...@@ -21,6 +21,8 @@ PATH_TO_SCRIPTS_DIR=${4}/scripts
PATH_TO_NGINX_CONFIG_FILE=${PATH_TO_SCRIPTS_DIR}/nginx/default.conf PATH_TO_NGINX_CONFIG_FILE=${PATH_TO_SCRIPTS_DIR}/nginx/default.conf
APPLICATION_ROOT_PATH=/home/demo APPLICATION_ROOT_PATH=/home/demo
DB_PASSWORD_ENV=${5}
# Archive name # Archive name
LATEST_ARTIFACT_NAME=application-${VERSION}.tar.gz LATEST_ARTIFACT_NAME=application-${VERSION}.tar.gz
...@@ -49,5 +51,5 @@ scp VERSION ${HOST}:${APPLICATION_ROOT_PATH} ...@@ -49,5 +51,5 @@ scp VERSION ${HOST}:${APPLICATION_ROOT_PATH}
echo ${HOST} echo ${HOST}
ssh ${HOST} <<EOL ssh ${HOST} <<EOL
chmod +x ${APPLICATION_ROOT_PATH}/apply-update.sh chmod +x ${APPLICATION_ROOT_PATH}/apply-update.sh
${APPLICATION_ROOT_PATH}/apply-update.sh ${INSTANCE_NAME} ${LATEST_ARTIFACT_NAME} ${APPLICATION_ROOT_PATH} ${APPLICATION_ROOT_PATH}/apply-update.sh ${INSTANCE_NAME} ${LATEST_ARTIFACT_NAME} ${APPLICATION_ROOT_PATH} ${DB_PASSWORD_ENV}
EOL EOL
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment