Skip to content
This repository has been archived by the owner on Jun 5, 2024. It is now read-only.

Commit

Permalink
Merge pull request #6 from suyiiyii/dev
Browse files Browse the repository at this point in the history
更新文档
  • Loading branch information
suyiiyii authored May 11, 2024
2 parents a74b74a + 164326d commit 060814c
Show file tree
Hide file tree
Showing 7 changed files with 69 additions and 30 deletions.
22 changes: 14 additions & 8 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
37 changes: 37 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -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
25 changes: 16 additions & 9 deletions DOC/Beamer/outline.md
Original file line number Diff line number Diff line change
@@ -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
Binary file added DOC/汇报幻灯片.pptx
Binary file not shown.
15 changes: 2 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,6 @@ FROM maven:3.9.6-eclipse-temurin-17 as build

WORKDIR /app

# 更换 Maven 镜像源
RUN echo '<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">\
<mirrors>\
<mirror>\
<id>alimaven</id>\
<name>aliyun maven</name>\
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>\
<mirrorOf>central</mirrorOf>\
</mirror>\
</mirrors>\
</settings>' > /usr/share/maven/conf/settings.xml

COPY pom.xml .

RUN mvn dependency:go-offline -B
Expand All @@ -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
Expand Down
Binary file removed 项目报告.pdf
Binary file not shown.
Binary file removed 项目报告幻灯片.pdf
Binary file not shown.

0 comments on commit 060814c

Please sign in to comment.