Skip to content

Commit

Permalink
feat: 修改Dockerfile,新增本地快速构建脚本
Browse files Browse the repository at this point in the history
  • Loading branch information
chufan443 committed Feb 8, 2023
1 parent 9f5f50a commit 1a4d3d6
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
4 changes: 2 additions & 2 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
##
## 服务名: JavaScriptCollection
## IP范围: 172.30.0.100
## IP范围: 172.30.0.200
##
version: '2'
services:
Expand All @@ -12,7 +12,7 @@ services:
- "7100:80"
networks:
net:
ipv4_address: 172.30.0.100
ipv4_address: 172.30.0.200

## 创建桥接网络
networks:
Expand Down
3 changes: 1 addition & 2 deletions scripts/build_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ run(){
echo -e "${successLogger}---------------- shell ${projectName} start ---------------- "
if [ "${isFaster}" == "faster" ];then
## 本地构建、快速制作镜像
# npm run build &&
docker build -f Faster.Dockerfile --build-arg APP_VERSION="${version}" -t "${imageTagName}" .
npm run build && docker build -f Faster.Dockerfile --build-arg APP_VERSION="${version}" -t "${imageTagName}" .
else
## ci流程构建
docker build -f Dockerfile --build-arg APP_VERSION="${version}" -t "${imageTagName}" .
Expand Down
2 changes: 1 addition & 1 deletion scripts/deploy.bash
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ deploy_JavaScriptCollection(){
echo -e "${successLogger}---------------- deploy ${containerName} start ---------------- "

docker run -d --name "${containerName}" \
-p 0.0.0.0:7200:80 \
-p 0.0.0.0:7100:80 \
--network="${networkName}" \
--restart=unless-stopped \
--ip=172.30.0.200 \
Expand Down
10 changes: 5 additions & 5 deletions scripts/page_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@ if [ "${commitInfo}" -eq "" ]; then
commitInfo="JavaScriptCollection Init"
fi

git commit -m "refactor:${commitInfo}"
## 配置个人信息
git config user.name "吃芝士葡萄的妹妹"
git config user.email "fairy_vip@2925.com"

git commit -m "refactor:${commitInfo}"

## 配置个人信息
git config user.name "喜欢吃芝士葡萄的妹妹"
git config user.email "fairy0115@2925.com"

# if you are deploying to https://<USERNAME>.github.io
# git push -f git@github.com:<USERNAME>/<USERNAME>.github.io.git master

# if you are deploying to https://<USERNAME>.github.io/<REPO>
git push -f https://github.com/mmdapl/JavaScriptCollection.git master:pages/github
git push -f https://github.com/142vip/JavaScriptCollection.git main:pages/github


cd -

0 comments on commit 1a4d3d6

Please sign in to comment.