Skip to content

Commit

Permalink
Merge pull request #56 from stack-wuh/feat-ci
Browse files Browse the repository at this point in the history
fix: (ci) 测试自动重启容器脚本错误
  • Loading branch information
stack-wuh committed Dec 12, 2021
2 parents e1f39d9 + 283a565 commit 0452a74
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,4 @@ jobs:
echo "$GITHUB_CONTEXT"
cd /home/next-web-app/frontend
./bin/clear-docker.sh
./bin/build-container.sh ${{ steps.previoustag.outputs.tag }} hello world
./bin/build-container.sh ${{ steps.previoustag.outputs.tag }}
8 changes: 3 additions & 5 deletions bin/build-container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,16 @@

set -e

VERSION=$(jq -r '.version' package.json)

echo '全部参数:' $@
echo 'version:' $0
echo 'version:' $1

echo '============== docker build contianer ==========='
echo '构建container的版本号: ' $VERSION
echo '构建container的版本号: ' $1

docker ps -a | grep 'frontend.' | awk '{print $1}' | xargs docker stop
docker ps -a | grep 'frontend.' | awk '{print $1}' | xargs docker rm
docker pull shadowu/wuh.site:latest
docker container run --name frontend.$VERSION -i -p 3100:3000 --restart=always shadowu/wuh.site:latest
docker container run --name frontend.v$1 -d -p 3101:3001 --restart=always shadowu/wuh.site:latest

systemctl status docker
systemctl restart nginx
Expand Down

2 comments on commit 0452a74

@vercel
Copy link

@vercel vercel bot commented on 0452a74 Dec 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deployment failed with the following error:

The most recent charge for your active payment method has failed. Please update it here: https://vercel.com/teams/163m/settings/billing.

@vercel
Copy link

@vercel vercel bot commented on 0452a74 Dec 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.