소스 검색

envirnment and update scirpt

master
Daniel 1 년 전
부모
커밋
e99e111032
4개의 변경된 파일76개의 추가작업 그리고 67개의 파일을 삭제
  1. +0
    -65
      matsen-tool/1deployMatsenFE.sh
  2. +38
    -0
      matsen-tool/1localdeployMatsenFE.sh
  3. +36
    -0
      matsen-tool/2deployMatsenFE.sh
  4. +2
    -2
      matsen-tool/src/environments/environment.prod.ts

+ 0
- 65
matsen-tool/1deployMatsenFE.sh 파일 보기

@@ -1,65 +0,0 @@
#!/bin/bash

export PATH=/opt/plesk/php/8.2/bin:$PATH;

cd /var/www/vhosts/spawntree.de/git_repo_clones/matsen-tool-fe/
sudo git pull

echo "$(tput setab 2)matsen frontend has been PULLED$(tput sgr 0)"

rm -rf /var/www/vhosts/spawntree.de/matsen.spawntree.de/httpdocs/composer.lock
#cp -rf /var/www/vhosts/spawntree.de/git_repo_clones/matsen-tool-fe/httpdocs/composer.lock /var/www/vhosts/spawntree.de/matsen.spawntree.de/httpdocs
rm -rf /var/www/vhosts/spawntree.de/matsen.spawntree.de/httpdocs/composer.json
cp -rf /var/www/vhosts/spawntree.de/git_repo_clones/matsen-tool-fe/composer.json /var/www/vhosts/spawntree.de/matsen.spawntree.de/httpdocs

rm -rf /var/www/vhosts/spawntree.de/matsen.spawntree.de/httpdocs/config
cp -rf /var/www/vhosts/spawntree.de/git_repo_clones/matsen-tool-fe/config /var/www/vhosts/spawntree.de/matsen.spawntree.de/httpdocs

rm -rf /var/www/vhosts/spawntree.de/matsen.spawntree.de/httpdocs/bin
cp -rf /var/www/vhosts/spawntree.de/git_repo_clones/matsen-tool-fe/bin /var/www/vhosts/spawntree.de/matsen.spawntree.de/httpdocs

rm -rf /var/www/vhosts/spawntree.de/matsen.spawntree.de/httpdocs/migrations
cp -rf /var/www/vhosts/spawntree.de/git_repo_clones/matsen-tool-fe/migrations /var/www/vhosts/spawntree.de/matsen.spawntree.de/httpdocs

rm -rf /var/www/vhosts/spawntree.de/matsen.spawntree.de/httpdocs/src
cp -rf /var/www/vhosts/spawntree.de/git_repo_clones/matsen-tool-fe/src /var/www/vhosts/spawntree.de/matsen.spawntree.de/httpdocs

rm -rf /var/www/vhosts/spawntree.de/matsen.spawntree.de/httpdocs/public/index.php
cp -rf /var/www/vhosts/spawntree.de/git_repo_clones/matsen-tool-fe/public/index.php /var/www/vhosts/spawntree.de/matsen.spawntree.de/httpdocs/public

echo "$(tput setab 2)Files have been copied$(tput sgr 0)"

cd /var/www/vhosts/spawntree.de/matsen.spawntree.de/httpdocs
composer update --no-scripts

echo "$(tput setab 2)COMPOSER UPDATED updated$(tput sgr 0)"

php /var/www/vhosts/spawntree.de/matsen.spawntree.de/httpdocs/bin/console doctrine:migrations:migrate

echo "$(tput setab 2)DATABASE SCHEMA updated$(tput sgr 0)"

cd /var/www/vhosts/spawntree.de/
sudo chmod 777 matsen.spawntree.de
cd /var/www/vhosts/spawntree.de/matsen.spawntree.de/
sudo chmod 777 -R *

cd /var/www/vhosts/spawntree.de/matsen.spawntree.de/httpdocs/var/cache/
rm -R *

php /var/www/vhosts/spawntree.de/matsen.spawntree.de/httpdocs/bin/console cache:clear
php /var/www/vhosts/spawntree.de/matsen.spawntree.de/httpdocs/bin/console cache:warmup

echo "$(tput setab 2)CACHE HAS BEEN CLEARED$(tput sgr 0)"

cd /var/www/vhosts/spawntree.de/matsen.spawntree.de/httpdocs/var/
chmod 777 -R *
chmod 777 cache/ *
chmod 777 cache/

#service apache2 restart

#echo "$(tput setab 2)CACHE cleared$(tput sgr 0)"

echo "$(tput setab 7)$(tput setaf 1)THINK ABOUT POSSIBLE PATCHES!"

echo "You have updated matsen api!$(tput sgr 0)"

+ 38
- 0
matsen-tool/1localdeployMatsenFE.sh 파일 보기

@@ -0,0 +1,38 @@
#!/bin/bash

TARGET_PATH="/var/www/crm/matsen-tool"
GIT_PATH="/var/www/matsen-git-repository/matsen-tool-fe/matsen-tool"

create_directories() {
# Erstelle notwendige Verzeichnisse falls sie nicht existieren
mkdir -p ${TARGET_PATH}/angular
}

copy_files() {
cd ${GIT_PATH}
sudo GIT_SSH_COMMAND="ssh -i /home/service-spawntree/.ssh/id_rsa -p 1122" git pull
echo "$(tput setab 2)matsen fe has been PULLED$(tput sgr 0)"

CONFIG_FILES=""
CONFIG_DIRS=""
ROOT_DIRS=""

# Erstelle zuerst alle notwendigen Verzeichnisse
create_directories

cd ${TARGET_PATH}/angular

# Alles außer node_modules löschen
find . -maxdepth 1 ! -name 'node_modules' ! -name '.' -exec rm -rf {} +
echo "$(tput setab 2)Client update$(tput sgr 0)"
cp -r ${GIT_PATH}/* ${TARGET_PATH}/angular

echo "$(tput setab 2)Files have been copied$(tput sgr 0)"
}

copy_files

npm install
npx ng build --configuration production

echo "You have updated matsen api!$(tput sgr 0)"

+ 36
- 0
matsen-tool/2deployMatsenFE.sh 파일 보기

@@ -0,0 +1,36 @@
#!/bin/bash

TARGET_PATH="/var/www/crm/matsen-tool"
GIT_PATH="/var/www/matsen-git-repository/matsen-tool-fe/matsen-tool"

create_directories() {
# Erstelle notwendige Verzeichnisse falls sie nicht existieren
mkdir -p ${TARGET_PATH}/angular
}

copy_files() {
cd ${GIT_PATH}
sudo GIT_SSH_COMMAND="ssh -i /home/service-spawntree/.ssh/id_rsa -p 1122" git pull
echo "$(tput setab 2)matsen fe has been PULLED$(tput sgr 0)"

# Erstelle zuerst alle notwendigen Verzeichnisse
create_directories

cd ${TARGET_PATH}/angular

# Alles außer node_modules löschen
find . -maxdepth 1 ! -name 'node_modules' ! -name '.' -exec rm -rf {} +
echo "$(tput setab 2)Client update$(tput sgr 0)"
cp -r ${GIT_PATH}/* ${TARGET_PATH}/angular

echo "$(tput setab 2)Files have been copied$(tput sgr 0)"
}

copy_files

npm install
npx ng build --configuration production

cp -r ${TARGET_PATH}/angular/dist/* ${TARGET_PATH}/browser

echo "You have updated matsen client!$(tput sgr 0)"

+ 2
- 2
matsen-tool/src/environments/environment.prod.ts 파일 보기

@@ -1,5 +1,5 @@
export const environment = {
production: true,
basePath: 'https://matsen-tool-be.ddev.site:8443',
apiUrl: 'https://matsen-tool-be.ddev.site:8443/api'
basePath: 'http://crm-api.matsen.lokal/',
apiUrl: 'http://crm-api.matsen.lokal/api'
};

불러오는 중...
취소
저장