Skip to content

Commit

Permalink
Merge pull request #1998 from xiagw/fix-backup-bug
Browse files Browse the repository at this point in the history
fix backup bug
  • Loading branch information
star7th authored Jul 18, 2023
2 parents ddeef0a + cd32322 commit 6858813
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
.github
.gitignore
Dockerfile*
docker-compose.yml

.git/
Application/Runtime/
Expand Down
10 changes: 5 additions & 5 deletions docker.run.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/usr/bin/env bash

set -e

## web site dir
showdoc_dir='/showdoc_data'
showdoc_dir_old='/showdoc_data_old'
Expand Down Expand Up @@ -29,6 +27,7 @@ else
fi
fi
## upgrade (通过 Dockerfile 的环境变量 变更版本)
## upgrade (通过 composer.json "version" 变更版本)
version_json=$(grep -o '"version":.*"' $file_json | awk '{print $2}')
version_json="${version_json//\"/}"
if [ -f $file_ver ]; then
Expand Down Expand Up @@ -78,20 +77,21 @@ while [ -f $db_file ]; do
## remove old files (15 days ago)
find ${db_file}.* -type f -ctime +15 -print0 |
xargs -t -0 rm -f >/dev/null
sleep 2
fi
sleep 50
sleep 58
done &
pids="$pids $!"

(
sleep 3
cd $showdoc_html_dir/server
cd $showdoc_html_dir/server || exit 1
php index.php /api/update/dockerUpdateCode
)
(
echo "delay 30s start mock..."
sleep 30
cd $showdoc_dir/mock/
cd $showdoc_dir/mock/ || exit 1
npm run start
) &
pids="$pids $!"
Expand Down

0 comments on commit 6858813

Please sign in to comment.