|
@@ -15,17 +15,21 @@ fi
|
|
|
ln -f -s /data/docker/config/nginx/nginx.conf /etc/nginx/nginx.conf
|
|
ln -f -s /data/docker/config/nginx/nginx.conf /etc/nginx/nginx.conf
|
|
|
ln -f -s /data/config/nginx.conf /etc/nginx/conf.d/proginn.conf
|
|
ln -f -s /data/config/nginx.conf /etc/nginx/conf.d/proginn.conf
|
|
|
rm -f /etc/nginx/sites-enabled/default
|
|
rm -f /etc/nginx/sites-enabled/default
|
|
|
|
|
+echo "nginx config success"
|
|
|
|
|
|
|
|
# 同步phpfpm配置
|
|
# 同步phpfpm配置
|
|
|
ln -f -s /code/config/php7/web/pool.test.conf /etc/php/7.2/fpm/pool.d/www.conf
|
|
ln -f -s /code/config/php7/web/pool.test.conf /etc/php/7.2/fpm/pool.d/www.conf
|
|
|
|
|
+echo "phpfpm config success"
|
|
|
|
|
|
|
|
# sync cron
|
|
# sync cron
|
|
|
cp /data/docker/config/crontab/container-code-up /etc/crontab
|
|
cp /data/docker/config/crontab/container-code-up /etc/crontab
|
|
|
|
|
+echo "cron config success"
|
|
|
|
|
|
|
|
cp -Rf /data/docker/config/id_rsa ~/.ssh/
|
|
cp -Rf /data/docker/config/id_rsa ~/.ssh/
|
|
|
cp -Rf /data/docker/config/id_rsa.pub ~/.ssh/
|
|
cp -Rf /data/docker/config/id_rsa.pub ~/.ssh/
|
|
|
chmod 700 ~/.ssh/id_rsa
|
|
chmod 700 ~/.ssh/id_rsa
|
|
|
chmod 700 ~/.ssh/id_rsa.pub
|
|
chmod 700 ~/.ssh/id_rsa.pub
|
|
|
|
|
+echo "ssh config success"
|
|
|
|
|
|
|
|
# 更新代码
|
|
# 更新代码
|
|
|
chown -R www-data:www-data /code
|
|
chown -R www-data:www-data /code
|
|
@@ -43,6 +47,7 @@ su -c "cd /proginn-bituni && git checkout -f origin/dev" -s /bin/bash - www-data
|
|
|
chown -R www-data:www-data /proginn-frontend
|
|
chown -R www-data:www-data /proginn-frontend
|
|
|
su -c "cd /proginn-frontend && git pull || git reset --hard FETCH_HEAD" -s /bin/bash - www-data
|
|
su -c "cd /proginn-frontend && git pull || git reset --hard FETCH_HEAD" -s /bin/bash - www-data
|
|
|
su -c "cd /proginn-frontend && git checkout -f origin/$PROGINN_FRONTEND_BRANCH" -s /bin/bash - www-data
|
|
su -c "cd /proginn-frontend && git checkout -f origin/$PROGINN_FRONTEND_BRANCH" -s /bin/bash - www-data
|
|
|
|
|
+echo "git config success"
|
|
|
|
|
|
|
|
# 初始化目录
|
|
# 初始化目录
|
|
|
chown -R www-data:www-data /var/www
|
|
chown -R www-data:www-data /var/www
|