Skip to content

Commit

Permalink
refact direction
Browse files Browse the repository at this point in the history
  • Loading branch information
bobolau committed Jun 19, 2019
1 parent 7eba94c commit ad5ef7c
Show file tree
Hide file tree
Showing 1,282 changed files with 114 additions and 84 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 9 additions & 0 deletions eap-service/eap-fast/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#FROM openjdk:8-jdk-alpine
FROM szopen/openjdk:8-jdk-alpine
VOLUME /tmp
ARG DEPENDENCY=./target/dependency
COPY ${DEPENDENCY}/BOOT-INF/lib /app/lib
COPY ${DEPENDENCY}/META-INF /app/META-INF
COPY ${DEPENDENCY}/BOOT-INF/classes /app
EXPOSE 8080
ENTRYPOINT ["java","-cp","app:app/lib/*","org.openea.EapFastApplication"]
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM openjdk:8-jdk-alpine
#FROM openjdk:8-jdk-alpine
FROM szopen/openjdk:8-jdk-alpine
VOLUME /tmp
ARG JAR_FILE=target/eap*.jar
COPY ${JAR_FILE} app.jar
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions service/eap-fast/README.md → eap-service/eap-fast/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ eap-fast
<br>


**后端部署**
**后端部署**
- 通过git下载源码
- idea、eclipse需安装lombok插件,不然会提示找不到entity的get set方法
- 创建数据库eap_fast,数据库编码为UTF-8
Expand All @@ -70,7 +70,7 @@ eap-fast

<br>

**前端部署**
**前端部署**
- 本项目是前后端分离的,还需要部署前端,才能运行起来
- 前端部署完毕,就可以访问项目了,账号:admin,密码:admin

Expand Down
29 changes: 29 additions & 0 deletions eap-service/eap-fast/build-eap-fast-image.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd ${DIR}
mvn clean -Dmaven.test.skip=true
mvn package -Dmaven.test.skip=true

cd target
#artifactId=$(ls eap*.jar |awk -F '[-]' '{print $1"-"$2}')
#version=$(ls eap*.jar |awk -F '[-]' '{print $3}')
artifactId=$(sed '/artifactId/!d;s/.*=//' maven-archiver/pom.properties)
version=$(sed '/version/!d;s/.*=//' maven-archiver/pom.properties)

cd ..
# unpack
mkdir -p target/dependency
(cd target/dependency; jar -xf ../*.jar)

# docker
docker build -t ${artifactId}:${version} -f ./Dockerfile .
docker tag ${artifactId}:${version} ${artifactId}:latest


# hub.docker.com/szopen
group=szopen
docker login -u szopen --password
docker tag ${artifactId}:${version} ${group}/${artifactId}:${version}
docker push ${group}/${artifactId}:${version}
docker tag ${artifactId}:${version} ${group}/${artifactId}:latest
#docker push ${group}/${artifactId}:latest
4 changes: 1 addition & 3 deletions service/eap-fast/pom.xml → eap-service/eap-fast/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>org.openea.eap</groupId>
<artifactId>eap-fast</artifactId>
<version>3.0.0</version>
<version>1.0.0</version>
<packaging>jar</packaging>
<description>eap-fast</description>

Expand Down Expand Up @@ -41,8 +41,6 @@
<fastjson.version>1.2.47</fastjson.version>
<hutool.version>4.1.12</hutool.version>
<lombok.version>1.18.8</lombok.version>


</properties>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ public void captcha(HttpServletResponse response, String uuid)throws IOException
public Map<String, Object> login(@RequestBody SysLoginForm form)throws IOException {
boolean captcha = sysCaptchaService.validate(form.getUuid(), form.getCaptcha());
if(!captcha){
return R.error("验证码不正确");
// test only
logger.warn("验证码不正确,user="+form.getUsername());
//return R.error("验证码不正确");
}

//用户信息
Expand Down
File renamed without changes.
Loading

0 comments on commit ad5ef7c

Please sign in to comment.