diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 793d8e0..475ac58 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -2,17 +2,23 @@ name: Docker Image CI on: push: - branches: [ "master" ] + branches: ["master", "dev"] pull_request: - branches: [ "master" ] + branches: ["master"] + workflow_dispatch: jobs: - build: - - runs-on: ubuntu-latest + runs-on: [self-hosted, linux, x64] + env: + # 定义镜像标签,为"commit id" + IMAGE_TAG: ${{ github.sha }} steps: - - uses: actions/checkout@v4 - - name: Build the Docker image - run: docker build . --file Dockerfile --tag my-image-name:$(date +%s) + - uses: actions/checkout@v4 + - name: Build the Docker imag + run: docker build . --file Dockerfile --tag ${{ secrets.REPOSITORY }}:${{ env.IMAGE_TAG }} + - name: Login to Registry + run: echo "${{ secrets.REPOSITORY_PASSWORD }}" | docker login -u "${{ secrets.REPOSITORY_USERNAME }}" --password-stdin ${{ secrets.REGISTRY }} + - name: Push the Docker image + run: docker push ${{ secrets.REPOSITORY }}:${{ env.IMAGE_TAG }} diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..f86d83b --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,37 @@ +# This file is a template, and might need editing before it works on your project. +# To contribute improvements to CI/CD templates, please follow the Development guide at: +# https://docs.gitlab.com/ee/development/cicd/templates.html +# This specific template is located at: +# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Docker.gitlab-ci.yml + +# Build a Docker image with CI/CD and push to the GitLab registry. +# Docker-in-Docker documentation: https://docs.gitlab.com/ee/ci/docker/using_docker_build.html +# +# This template uses one generic job with conditional builds +# for the default branch and all other (MR) branches. + +docker-build: + # Use the official docker image. + image: docker:cli + stage: build + services: + - docker:dind + variables: + DOCKER_IMAGE_NAME: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG + before_script: + - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY + # All branches are tagged with $DOCKER_IMAGE_NAME (defaults to commit ref slug) + # Default branch is also tagged with `latest` + script: + - docker build --pull -t "$DOCKER_IMAGE_NAME" . + - docker push "$DOCKER_IMAGE_NAME" + - | + if [[ "$CI_COMMIT_BRANCH" == "$CI_DEFAULT_BRANCH" ]]; then + docker tag "$DOCKER_IMAGE_NAME" "$CI_REGISTRY_IMAGE:latest" + docker push "$CI_REGISTRY_IMAGE:latest" + fi + # Run this job in a branch where a Dockerfile exists + rules: + - if: $CI_COMMIT_BRANCH + exists: + - Dockerfile diff --git a/DOC/Beamer/outline.md b/DOC/Beamer/outline.md index ee8c5a2..9025a88 100644 --- a/DOC/Beamer/outline.md +++ b/DOC/Beamer/outline.md @@ -1,18 +1,25 @@ - * 标题, 10s * 项目简介, 10-20s * 简要介绍背景 -* 项目功能 30s +* 项目功能 45s * 简要展示页面,介绍有哪一些功能 -* 项目亮点(难点亮点结合起来一起谈) - * 用户体验 +* 项目架构 45s +* 目亮点(难点亮点结合起来一起谈) +* * 用户体验20s * 3 * 二维码支付 - * RBAC权限校验,审计日志 - * 平台功能 - * 安全!!(HTTPS) - * 开放性 + * RBAC权限认证,审计日志 + * 使用集群部署,自动负载均衡,故障转移,保证用户良好体验(展示jmeter压测截图,对比) + * 平台功能 20s * 3 + * 连接安全!!(HTTPS,展示小锁图标,对比) + * 输入安全(xss,输入校验,展示输入不符合规则的提示,对比) * 第三方校验(RSA)(从开放接口到接口安全性) - * 平台理念 + * 平台理念 20s * 开放性 * 展示更多项目亮点 * 致谢,(心得体会,感谢师兄,感谢老师的指导)20s + +以设问的形式引出问题 + + + +10+45+60+60+20+20 diff --git "a/DOC/\346\261\207\346\212\245\345\271\273\347\201\257\347\211\207.pptx" "b/DOC/\346\261\207\346\212\245\345\271\273\347\201\257\347\211\207.pptx" new file mode 100644 index 0000000..478380f Binary files /dev/null and "b/DOC/\346\261\207\346\212\245\345\271\273\347\201\257\347\211\207.pptx" differ diff --git a/Dockerfile b/Dockerfile index 6c00947..f09620a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,18 +3,6 @@ FROM maven:3.9.6-eclipse-temurin-17 as build WORKDIR /app -# 更换 Maven 镜像源 -RUN echo '\ - \ - \ - alimaven\ - aliyun maven\ - http://maven.aliyun.com/nexus/content/groups/public/\ - central\ - \ - \ - ' > /usr/share/maven/conf/settings.xml - COPY pom.xml . RUN mvn dependency:go-offline -B @@ -30,7 +18,8 @@ FROM tomcat:10.1.20-jre17-temurin-jammy as deploy RUN rm -rf /usr/local/tomcat/webapps/* # 将你的.war文件添加到Tomcat的webapps目录 -COPY --from=build /target/dangpay.war /usr/local/tomcat/webapps/ROOT.war + +COPY --from=build /app/target/dangpay.war /usr/local/tomcat/webapps/ROOT.war # 暴露8080端口 EXPOSE 8080 diff --git "a/\351\241\271\347\233\256\346\212\245\345\221\212.pdf" "b/\351\241\271\347\233\256\346\212\245\345\221\212.pdf" deleted file mode 100644 index 2d8f73e..0000000 Binary files "a/\351\241\271\347\233\256\346\212\245\345\221\212.pdf" and /dev/null differ diff --git "a/\351\241\271\347\233\256\346\212\245\345\221\212\345\271\273\347\201\257\347\211\207.pdf" "b/\351\241\271\347\233\256\346\212\245\345\221\212\345\271\273\347\201\257\347\211\207.pdf" deleted file mode 100644 index 4f154d9..0000000 Binary files "a/\351\241\271\347\233\256\346\212\245\345\221\212\345\271\273\347\201\257\347\211\207.pdf" and /dev/null differ