Compare commits
No commits in common. "48b79ffd7f197cde178c55ac002e1c3a230650ea" and "0e8fb6acb4bdf603e3b4249c1bf3a95543638f80" have entirely different histories.
48b79ffd7f
...
0e8fb6acb4
98
.drone.yml
98
.drone.yml
@ -1,98 +0,0 @@
|
|||||||
kind: pipeline # 定义对象类型,还有secret和signature两种类型
|
|
||||||
|
|
||||||
type: docker # 定义流水线类型,还有kubernetes、exec、ssh等类型
|
|
||||||
|
|
||||||
name: filesystem-drone # 定义流水线名称
|
|
||||||
|
|
||||||
|
|
||||||
steps: # 定义流水线执行步骤,这些步骤将顺序执行
|
|
||||||
|
|
||||||
- name: package # 流水线名称
|
|
||||||
|
|
||||||
image: maven:3-jdk-8 # 定义创建容器的Docker镜像
|
|
||||||
|
|
||||||
volumes: # 将容器内目录挂载到宿主机,仓库需要开启Trusted设置
|
|
||||||
|
|
||||||
- name: maven-cache
|
|
||||||
|
|
||||||
path: /root/.m2 # 将maven下载依赖的目录挂载出来,防止重复下载
|
|
||||||
|
|
||||||
- name: maven-build
|
|
||||||
|
|
||||||
path: /app/build # 将应用打包好的Jar和执行脚本挂载出来
|
|
||||||
|
|
||||||
commands: # 定义在Docker容器中执行的shell命令
|
|
||||||
|
|
||||||
- mvn package -Dmaven.test.skip=true # 应用打包命令
|
|
||||||
|
|
||||||
# - cd yudao-server/target/
|
|
||||||
# - ls
|
|
||||||
|
|
||||||
- cp yudao-server/target/yudao-server.jar /app/build/yudao-server.jar
|
|
||||||
|
|
||||||
- cp yudao-server/Dockerfile /app/build/Dockerfile
|
|
||||||
|
|
||||||
- cp yudao-server/run.sh /app/build/run.sh
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- name: copy package
|
|
||||||
|
|
||||||
image: appleboy/drone-ssh # SSH工具镜像
|
|
||||||
|
|
||||||
settings:
|
|
||||||
|
|
||||||
host: 101.43.112.107 # 远程连接地址
|
|
||||||
|
|
||||||
username: root # 远程连接账号
|
|
||||||
|
|
||||||
password:
|
|
||||||
|
|
||||||
from_secret: ssh_password # 从Secret中读取SSH密码
|
|
||||||
|
|
||||||
port: 22 # 远程连接端口
|
|
||||||
|
|
||||||
command_timeout: 5m # 远程执行命令超时时间
|
|
||||||
|
|
||||||
script:
|
|
||||||
# - ls
|
|
||||||
- scp -r /zymail/maven/build root@1.14.205.126:/zymail
|
|
||||||
# - ssh root@1.14.205.126
|
|
||||||
# - ls
|
|
||||||
|
|
||||||
# - chmod +x run.sh # 更改为可执行脚本
|
|
||||||
|
|
||||||
# - ./run.sh # 运行脚本打包应用镜像并运行
|
|
||||||
- name: build-start
|
|
||||||
|
|
||||||
image: appleboy/drone-ssh # SSH工具镜像
|
|
||||||
|
|
||||||
settings:
|
|
||||||
|
|
||||||
host: 1.14.205.126 # 远程连接地址
|
|
||||||
|
|
||||||
username: root # 远程连接账号
|
|
||||||
|
|
||||||
password:
|
|
||||||
|
|
||||||
from_secret: ssh_password # 从Secret中读取SSH密码
|
|
||||||
|
|
||||||
port: 22 # 远程连接端口
|
|
||||||
|
|
||||||
command_timeout: 5m # 远程执行命令超时时间
|
|
||||||
|
|
||||||
script:
|
|
||||||
# - ls
|
|
||||||
- cd /zymail/build
|
|
||||||
- chmod +x run.sh # 更改为可执行脚本
|
|
||||||
- ./run.sh # 运行脚本打包应用镜像并运行
|
|
||||||
|
|
||||||
volumes: # 定义流水线挂载目录,用于共享数据
|
|
||||||
|
|
||||||
- name: maven-build
|
|
||||||
host:
|
|
||||||
path: /zymail/maven/build # 从宿主机中挂载的目录
|
|
||||||
|
|
||||||
- name: maven-cache
|
|
||||||
host:
|
|
||||||
path: /zymail/maven/cache # 从宿主机中挂载的目录
|
|
40
pom.xml
40
pom.xml
@ -131,29 +131,35 @@
|
|||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
|
<!-- 使用 huawei / aliyun 的 Maven 源,提升下载速度 -->
|
||||||
<repositories>
|
<repositories>
|
||||||
<repository>
|
<repository>
|
||||||
<id>public</id>
|
<id>huaweicloud</id>
|
||||||
<name>aliyun nexus</name>
|
<name>huawei</name>
|
||||||
|
<url>https://mirrors.huaweicloud.com/repository/maven/</url>
|
||||||
|
</repository>
|
||||||
|
<repository>
|
||||||
|
<id>aliyunmaven</id>
|
||||||
|
<name>aliyun</name>
|
||||||
<url>https://maven.aliyun.com/repository/public</url>
|
<url>https://maven.aliyun.com/repository/public</url>
|
||||||
|
</repository>
|
||||||
|
|
||||||
|
<repository>
|
||||||
|
<id>spring-milestones</id>
|
||||||
|
<name>Spring Milestones</name>
|
||||||
|
<url>https://repo.spring.io/milestone</url>
|
||||||
|
<snapshots>
|
||||||
|
<enabled>false</enabled>
|
||||||
|
</snapshots>
|
||||||
|
</repository>
|
||||||
|
<repository>
|
||||||
|
<id>spring-snapshots</id>
|
||||||
|
<name>Spring Snapshots</name>
|
||||||
|
<url>https://repo.spring.io/snapshot</url>
|
||||||
<releases>
|
<releases>
|
||||||
<enabled>true</enabled>
|
<enabled>false</enabled>
|
||||||
</releases>
|
</releases>
|
||||||
</repository>
|
</repository>
|
||||||
</repositories>
|
</repositories>
|
||||||
|
|
||||||
<pluginRepositories>
|
|
||||||
<pluginRepository>
|
|
||||||
<id>public</id>
|
|
||||||
<name>aliyun nexus</name>
|
|
||||||
<url>https://maven.aliyun.com/repository/public</url>
|
|
||||||
<releases>
|
|
||||||
<enabled>true</enabled>
|
|
||||||
</releases>
|
|
||||||
<snapshots>
|
|
||||||
<enabled>false</enabled>
|
|
||||||
</snapshots>
|
|
||||||
</pluginRepository>
|
|
||||||
</pluginRepositories>
|
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 313 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.1 MiB |
@ -1,169 +1,104 @@
|
|||||||
<template>
|
<template>
|
||||||
<div :class="prefixCls" class="relative h-[100%] lt-md:px-10px lt-sm:px-10px">
|
<div
|
||||||
<div class="relative mx-auto h-full flex">
|
:class="prefixCls"
|
||||||
<!-- <div :class="`${prefixCls}__left flex-1 bg-gray-500 bg-opacity-20 relative p-30px lt-xl:hidden`"> -->
|
class="relative h-[100%] lt-md:px-10px lt-sm:px-10px lt-xl:px-10px lt-xl:px-10px"
|
||||||
<!-- 左上角的 logo + 系统标题 -->
|
>
|
||||||
<!-- <div class="relative flex items-center text-white">
|
<div class="relative mx-auto h-full flex">
|
||||||
<img alt="" class="mr-10px w-48px" src="@/assets/imgs/zy-logo.jpg" />
|
<div
|
||||||
<span class="text-20px font-bold">{{ underlineToHump(appStore.getTitle) }}</span>
|
:class="`${prefixCls}__left flex-1 bg-gray-500 bg-opacity-20 relative p-30px lt-xl:hidden`"
|
||||||
</div> -->
|
>
|
||||||
<!-- 左边的背景图 + 欢迎语 -->
|
<!-- 左上角的 logo + 系统标题 -->
|
||||||
<!-- <div class="h-[calc(100%-60px)] flex items-center justify-center">
|
<div class="relative flex items-center text-white">
|
||||||
<TransitionGroup appear enter-active-class="animate__animated animate__bounceInLeft" tag="div">
|
<img alt="" class="mr-10px w-48px" src="@/assets/imgs/zy-logo.jpg" />
|
||||||
<img key="1" alt="" class="w-350px" src="@/assets/svgs/login-box-bg.svg" />
|
<span class="text-20px font-bold">{{ underlineToHump(appStore.getTitle) }}</span>
|
||||||
<div key="2" class="text-3xl text-white">{{ t('login.welcome') }}</div>
|
</div>
|
||||||
<div key="3" class="mt-5 text-14px font-normal text-white">
|
<!-- 左边的背景图 + 欢迎语 -->
|
||||||
{{ t('login.message') }}
|
<div class="h-[calc(100%-60px)] flex items-center justify-center">
|
||||||
</div>
|
<TransitionGroup
|
||||||
</TransitionGroup>
|
appear
|
||||||
</div> -->
|
enter-active-class="animate__animated animate__bounceInLeft"
|
||||||
<!-- </div> -->
|
tag="div"
|
||||||
<div class="login relative flex-1 p-30px dark:bg-[var(--login-bg-color)] lt-sm:p-10px">
|
>
|
||||||
<!-- 右上角的主题、语言选择 -->
|
<img key="1" alt="" class="w-350px" src="@/assets/svgs/login-box-bg.svg" />
|
||||||
<div class="flex items-center justify-between text-white at-2xl:justify-end at-xl:justify-end">
|
<div key="2" class="text-3xl text-white">{{ t('login.welcome') }}</div>
|
||||||
<div class="flex items-center at-2xl:hidden at-xl:hidden">
|
<div key="3" class="mt-5 text-14px font-normal text-white">
|
||||||
<img alt="" class="mr-10px w-48px" src="@/assets/imgs/logo.png" />
|
{{ t('login.message') }}
|
||||||
<span class="text-20px font-bold">{{ underlineToHump(appStore.getTitle) }}</span>
|
</div>
|
||||||
</div>
|
</TransitionGroup>
|
||||||
<div class="flex items-center justify-end space-x-10px">
|
</div>
|
||||||
<ThemeSwitch />
|
</div>
|
||||||
<LocaleDropdown class="dark:text-white lt-xl:text-white" />
|
<div class="relative flex-1 p-30px dark:bg-[var(--login-bg-color)] lt-sm:p-10px">
|
||||||
</div>
|
<!-- 右上角的主题、语言选择 -->
|
||||||
</div>
|
<div
|
||||||
<!-- 右边的登录界面 -->
|
class="flex items-center justify-between text-white at-2xl:justify-end at-xl:justify-end"
|
||||||
<Transition appear enter-active-class="animate__animated animate__bounceInRight">
|
>
|
||||||
<!-- at-2xl:max-w-500px at-lg:max-w-500px at-md:max-w-500px at-xl:max-w-500px -->
|
<div class="flex items-center at-2xl:hidden at-xl:hidden">
|
||||||
<div class="login-cont m-auto h-full w-[100%] flex items-center ">
|
<img alt="" class="mr-10px w-48px" src="@/assets/imgs/logo.png" />
|
||||||
<div class="xia">
|
<span class="text-20px font-bold">{{ underlineToHump(appStore.getTitle) }}</span>
|
||||||
<div class="left">
|
</div>
|
||||||
<img src="@/assets/imgs/login-back-left.png" alt="" />
|
<div class="flex items-center justify-end space-x-10px">
|
||||||
</div>
|
<ThemeSwitch />
|
||||||
<div class="right">
|
<LocaleDropdown class="dark:text-white lt-xl:text-white" />
|
||||||
<!-- 账号登录 -->
|
</div>
|
||||||
<LoginForm class="m-auto h-auto p-20px lt-xl:(rounded-3xl light:bg-white)" />
|
</div>
|
||||||
<!-- 手机登录 -->
|
<!-- 右边的登录界面 -->
|
||||||
<MobileForm class="m-auto h-auto p-20px lt-xl:(rounded-3xl light:bg-white)" />
|
<Transition appear enter-active-class="animate__animated animate__bounceInRight">
|
||||||
<!-- 二维码登录 -->
|
<div
|
||||||
<QrCodeForm class="m-auto h-auto p-20px lt-xl:(rounded-3xl light:bg-white)" />
|
class="m-auto h-full w-[100%] flex items-center at-2xl:max-w-500px at-lg:max-w-500px at-md:max-w-500px at-xl:max-w-500px"
|
||||||
<!-- 注册 -->
|
>
|
||||||
<RegisterForm class="m-auto h-auto p-20px lt-xl:(rounded-3xl light:bg-white)" />
|
<!-- 账号登录 -->
|
||||||
<!-- 三方登录 -->
|
<LoginForm class="m-auto h-auto p-20px lt-xl:(rounded-3xl light:bg-white)" />
|
||||||
<SSOLoginVue class="m-auto h-auto p-20px lt-xl:(rounded-3xl light:bg-white)" />
|
<!-- 手机登录 -->
|
||||||
</div>
|
<MobileForm class="m-auto h-auto p-20px lt-xl:(rounded-3xl light:bg-white)" />
|
||||||
</div>
|
<!-- 二维码登录 -->
|
||||||
</div>
|
<QrCodeForm class="m-auto h-auto p-20px lt-xl:(rounded-3xl light:bg-white)" />
|
||||||
</Transition>
|
<!-- 注册 -->
|
||||||
</div>
|
<RegisterForm class="m-auto h-auto p-20px lt-xl:(rounded-3xl light:bg-white)" />
|
||||||
</div>
|
<!-- 三方登录 -->
|
||||||
</div>
|
<SSOLoginVue class="m-auto h-auto p-20px lt-xl:(rounded-3xl light:bg-white)" />
|
||||||
|
</div>
|
||||||
|
</Transition>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { underlineToHump } from '@/utils'
|
import { underlineToHump } from '@/utils'
|
||||||
|
|
||||||
import { useDesign } from '@/hooks/web/useDesign'
|
import { useDesign } from '@/hooks/web/useDesign'
|
||||||
import { useAppStore } from '@/store/modules/app'
|
import { useAppStore } from '@/store/modules/app'
|
||||||
import { ThemeSwitch } from '@/layout/components/ThemeSwitch'
|
import { ThemeSwitch } from '@/layout/components/ThemeSwitch'
|
||||||
import { LocaleDropdown } from '@/layout/components/LocaleDropdown'
|
import { LocaleDropdown } from '@/layout/components/LocaleDropdown'
|
||||||
|
|
||||||
import { LoginForm, MobileForm, QrCodeForm, RegisterForm, SSOLoginVue } from './components'
|
import { LoginForm, MobileForm, QrCodeForm, RegisterForm, SSOLoginVue } from './components'
|
||||||
|
|
||||||
defineOptions({ name: 'Login' })
|
defineOptions({ name: 'Login' })
|
||||||
|
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
const appStore = useAppStore()
|
const appStore = useAppStore()
|
||||||
const { getPrefixCls } = useDesign()
|
const { getPrefixCls } = useDesign()
|
||||||
const prefixCls = getPrefixCls('login')
|
const prefixCls = getPrefixCls('login')
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
$prefix-cls: #{$namespace}-login;
|
||||||
|
|
||||||
|
.#{$prefix-cls} {
|
||||||
|
overflow: auto;
|
||||||
|
|
||||||
|
&__left {
|
||||||
$prefix-cls: #{$namespace}-login;
|
&::before {
|
||||||
|
position: absolute;
|
||||||
.#{$prefix-cls} {
|
top: 0;
|
||||||
overflow: auto;
|
left: 0;
|
||||||
|
z-index: -1;
|
||||||
&__left {
|
width: 100%;
|
||||||
&::before {
|
height: 100%;
|
||||||
position: absolute;
|
background-image: url('@/assets/svgs/login-bg.svg');
|
||||||
top: 0;
|
background-position: center;
|
||||||
left: 0;
|
background-repeat: no-repeat;
|
||||||
z-index: -1;
|
content: '';
|
||||||
width: 100%;
|
}
|
||||||
height: 100%;
|
}
|
||||||
background-image: url('@/assets/svgs/login-bg.svg');
|
}
|
||||||
background-position: center;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
content: '';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.login{
|
|
||||||
background:url('@/assets/imgs/login-back.png') no-repeat;
|
|
||||||
background-size:cover;
|
|
||||||
.login-cont{
|
|
||||||
width: 800px;
|
|
||||||
height: 100%;
|
|
||||||
background: transparent;
|
|
||||||
border-radius: 21px;
|
|
||||||
display: flex;
|
|
||||||
overflow: hidden;
|
|
||||||
.xia{
|
|
||||||
display:flex;
|
|
||||||
.left{
|
|
||||||
width: 50%;
|
|
||||||
display: flex;
|
|
||||||
img{
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.right{
|
|
||||||
flex:1;
|
|
||||||
background: white;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@media screen and (min-width:1001px){
|
|
||||||
::v-deep .el-form-item__content{
|
|
||||||
h2{
|
|
||||||
color:black;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media screen and (max-width:1000px){
|
|
||||||
.login{
|
|
||||||
background:transparent;
|
|
||||||
background-size:cover;
|
|
||||||
.login-cont{
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
border-radius: 21px;
|
|
||||||
display:flex;
|
|
||||||
background: transparent;
|
|
||||||
.xia{
|
|
||||||
.left{
|
|
||||||
width: 50%;
|
|
||||||
display: flex;
|
|
||||||
display:none;
|
|
||||||
img{
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.right{
|
|
||||||
flex:1;
|
|
||||||
background: transparent !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
@ -1,10 +1,12 @@
|
|||||||
FROM openjdk:8-jre
|
## AdoptOpenJDK 停止发布 OpenJDK 二进制,而 Eclipse Temurin 是它的延伸,提供更好的稳定性
|
||||||
|
## 感谢复旦核博士的建议!灰子哥,牛皮!
|
||||||
|
FROM eclipse-temurin:8-jre
|
||||||
|
|
||||||
## 创建目录,并使用它作为工作目录
|
## 创建目录,并使用它作为工作目录
|
||||||
RUN mkdir -p /yudao-server
|
RUN mkdir -p /yudao-server
|
||||||
WORKDIR /yudao-server
|
WORKDIR /yudao-server
|
||||||
## 将后端项目的 Jar 文件,复制到镜像中
|
## 将后端项目的 Jar 文件,复制到镜像中
|
||||||
ADD yudao-server.jar app.jar
|
COPY ./target/yudao-server.jar app.jar
|
||||||
|
|
||||||
## 设置 TZ 时区
|
## 设置 TZ 时区
|
||||||
ENV TZ=Asia/Shanghai
|
ENV TZ=Asia/Shanghai
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
app_name='zymall'
|
|
||||||
# 定义应用版本
|
|
||||||
app_version='1.0.0'
|
|
||||||
# 定义应用环境
|
|
||||||
#profile_active='prod'
|
|
||||||
echo '----stop container----'
|
|
||||||
docker stop ${app_name}
|
|
||||||
echo '----rm container----'
|
|
||||||
docker rm ${app_name}
|
|
||||||
#echo '----rm image----'
|
|
||||||
#docker rmi ${group_name}/${app_name}:${app_version}
|
|
||||||
# 打包编译docker镜像
|
|
||||||
echo '----build image----'
|
|
||||||
docker buildx build -f Dockerfile -t ${app_name}:${app_version} .
|
|
||||||
echo '----start container----'
|
|
||||||
docker run -d -p 6127:6127 --name ${app_name} ${app_name}:${app_version}
|
|
Loading…
Reference in New Issue
Block a user