-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#28 the complete correct repo has to be here before we continue
- Loading branch information
1 parent
29ff0c6
commit 8f80308
Showing
1 changed file
with
46 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -121,6 +121,50 @@ fi | |
printf "start installation\n\n" | ||
|
||
|
||
|
||
# stop and remove old containers | ||
printf " \n${YELLOW}stopping and removing old containers${NC}\n" | ||
# stop running container(s) | ||
docker ps -aq | xargs -r docker stop | ||
# remove existing container(s) | ||
docker ps -aq | xargs -r docker rm | ||
|
||
# Remove all volumes (to avoid cert generation issues) | ||
printf " \n${YELLOW}removing all volumes${NC}\n" | ||
docker volume ls -qf dangling=true | xargs -r docker volume rm | ||
|
||
# Remove all images | ||
printf " \n${YELLOW}removing all images${NC}\n" | ||
docker images -a -q | xargs -r docker rmi | ||
|
||
# and finally, cleanup Docker | ||
printf " \n${YELLOW}finally cleanup Docker${NC}\n" | ||
docker system prune -f | ||
|
||
# Clone the repository and its submodules | ||
printf " \n${YELLOW}cloning oih-ui-docker to $installDir${NC}\n" | ||
git clone --recurse-submodules [email protected]:iodepo/oih-ui-docker.git $installDir | ||
|
||
# Navigate to the project directory | ||
cd $installDir | ||
|
||
# Fetch the latest changes and check out the 'release' branch | ||
printf " \n${YELLOW}fetching and checking out the 'release' branch${NC}\n" | ||
git fetch | ||
git checkout release | ||
|
||
# Navigate to the 'frontend' directory, fetch the latest changes, and check out the 'feature/restyling' branch | ||
printf " \n${YELLOW}navigating to 'frontend' directory and fetching and checking out the 'feature/restyling' branch${NC}\n" | ||
cd $installDir/frontend | ||
git fetch | ||
git checkout feature/restyling | ||
|
||
# Return to the main directory and navigate to the 'api' directory, fetch the latest changes, and check out the 'feature/restyling' branch | ||
printf " \n${YELLOW}navigating to 'api' directory and fetching and checking out the 'feature/restyling' branch${NC}\n" | ||
cd $installDir/api | ||
git fetch | ||
git checkout feature/restyling | ||
|
||
# Create the .env file in the project directory | ||
cd $installDir | ||
touch $installDir/.env | ||
|
@@ -135,6 +179,7 @@ else | |
dockerComposeFile="docker-compose.workflow.yml" | ||
|
||
#copy the old file and add a date to the name | ||
printf "make backup of ${YELLOW}letsencrypt_user_data.conf${NC}\n" | ||
cp $installDir/nginx/conf.d/letsencrypt_user_data.conf $installDir/nginx/conf.d/letsencrypt_user_data.conf_$(date +%Y%m%d%H%M%S) | ||
|
||
#add the correct lines for the SSL certificates | ||
|
@@ -145,6 +190,7 @@ else | |
echo "LETSENCRYPT_workflow_HOST=('$workflowHost')" >> $installDir/nginx/conf.d/letsencrypt_user_data.conf | ||
|
||
#copy the old proxy file and add a date to the name | ||
printf "make backup of ${YELLOW}proxy.conf${NC}\n" | ||
cp $installDir/nginx/conf.d/proxy.conf $installDir/nginx/conf.d/proxy.conf_$(date +%Y%m%d%H%M%S) | ||
|
||
#add the correct lines for the nginx proxy | ||
|
@@ -183,50 +229,6 @@ else | |
|
||
fi | ||
|
||
exit 0 | ||
|
||
# stop and remove old containers | ||
printf " \n${YELLOW}stopping and removing old containers${NC}\n" | ||
# stop running container(s) | ||
docker ps -aq | xargs -r docker stop | ||
# remove existing container(s) | ||
docker ps -aq | xargs -r docker rm | ||
|
||
# Remove all volumes (to avoid cert generation issues) | ||
printf " \n${YELLOW}removing all volumes${NC}\n" | ||
docker volume ls -qf dangling=true | xargs -r docker volume rm | ||
|
||
# Remove all images | ||
printf " \n${YELLOW}removing all images${NC}\n" | ||
docker images -a -q | xargs -r docker rmi | ||
|
||
# and finally, cleanup Docker | ||
printf " \n${YELLOW}finally cleanup Docker${NC}\n" | ||
docker system prune -f | ||
|
||
# Clone the repository and its submodules | ||
printf " \n${YELLOW}cloning oih-ui-docker to $installDir${NC}\n" | ||
git clone --recurse-submodules [email protected]:iodepo/oih-ui-docker.git $installDir | ||
|
||
# Navigate to the project directory | ||
cd $installDir | ||
|
||
# Fetch the latest changes and check out the 'release' branch | ||
printf " \n${YELLOW}fetching and checking out the 'release' branch${NC}\n" | ||
git fetch | ||
git checkout release | ||
|
||
# Navigate to the 'frontend' directory, fetch the latest changes, and check out the 'feature/restyling' branch | ||
printf " \n${YELLOW}navigating to 'frontend' directory and fetching and checking out the 'feature/restyling' branch${NC}\n" | ||
cd $installDir/frontend | ||
git fetch | ||
git checkout feature/restyling | ||
|
||
# Return to the main directory and navigate to the 'api' directory, fetch the latest changes, and check out the 'feature/restyling' branch | ||
printf " \n${YELLOW}navigating to 'api' directory and fetching and checking out the 'feature/restyling' branch${NC}\n" | ||
cd $installDir/api | ||
git fetch | ||
git checkout feature/restyling | ||
|
||
# Copy Solr data to the target directory and change its permissions (change the root with the right one) | ||
printf " \n${YELLOW}copying Solr data to the target directory and changing its permissions${NC}\n" | ||
|