Skip to content

Commit

Permalink
* quitando swagger gcp
Browse files Browse the repository at this point in the history
* alpine jdk 14
  • Loading branch information
ripper2hl committed Aug 22, 2020
1 parent da0c52d commit dec634b
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 17 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ ADD pom.xml /usr/src/app/
RUN mvn -f /usr/src/app/pom.xml clean package -Dmaven.test.skip=true
RUN mv /usr/src/app/target/*.jar /usr/src/app/target/app.jar

FROM adoptopenjdk/openjdk14-openj9
FROM adoptopenjdk/openjdk14-openj9:jre-14.0.2_12_openj9-0.21.0-alpine
RUN mkdir /sepomex-indices/
COPY --from=build /usr/src/app/target/app.jar /
ENTRYPOINT java $JAVA_OPTS -XX:NativeMemoryTracking=summary -XX:+UnlockDiagnosticVMOptions -XX:+PrintNMTStatistics -Xshareclasses:cacheDir=/tmp,noPersistentDiskSpaceCheck -Xquickstart -jar /app.jar
ENTRYPOINT java -XX:MaxMetaspaceSize=64m -XX:CompressedClassSpaceSize=8m -Xss256k -Xmn8m -XX:InitialCodeCacheSize=4m -XX:ReservedCodeCacheSize=8m -XX:MaxDirectMemorySize=16m -XX:NativeMemoryTracking=summary -XX:+UnlockDiagnosticVMOptions -XX:+PrintNMTStatistics -Xshareclasses:cacheDir=/tmp,noPersistentDiskSpaceCheck -Xquickstart -XX:+UseContainerSupport -jar /app.jar
EXPOSE 8080
6 changes: 3 additions & 3 deletions Dockerfile.gcp
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
FROM maven:3.6.3-openjdk-11 AS build
FROM maven:3.6.3-adoptopenjdk-11-openj9 AS build
ADD src /usr/src/app/src
ADD pom.xml /usr/src/app/
RUN mvn -f /usr/src/app/pom.xml clean package -Pgcp -Dmaven.test.skip=true
RUN mv /usr/src/app/target/*.jar /usr/src/app/target/app.jar

FROM adoptopenjdk/openjdk11-openj9
FROM adoptopenjdk/openjdk14-openj9:jre-14.0.2_12_openj9-0.21.0-alpine
RUN mkdir /sepomex-indices/
COPY --from=build /usr/src/app/target/app.jar /
ENTRYPOINT java -Xmx120m -Xms64m -XX:NativeMemoryTracking=summary -XX:+UnlockDiagnosticVMOptions -XX:+PrintNMTStatistics -Xshareclasses:cacheDir=/tmp,noPersistentDiskSpaceCheck -Xquickstart -XX:+UseContainerSupport -jar /app.jar
ENTRYPOINT java -XX:MaxMetaspaceSize=64m -XX:CompressedClassSpaceSize=8m -Xss256k -Xmn8m -XX:InitialCodeCacheSize=4m -XX:ReservedCodeCacheSize=8m -XX:MaxDirectMemorySize=16m -XX:NativeMemoryTracking=summary -XX:+UnlockDiagnosticVMOptions -XX:+PrintNMTStatistics -Xshareclasses:cacheDir=/tmp,noPersistentDiskSpaceCheck -Xquickstart -XX:+UseContainerSupport -jar /app.jar
EXPOSE 8080
18 changes: 13 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,6 @@
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-boot-starter</artifactId>
<version>${spring.fox.version}</version>
</dependency>
<dependency>
<groupId>javax.el</groupId>
<artifactId>javax.el-api</artifactId>
Expand Down Expand Up @@ -214,6 +209,19 @@
</plugins>
</build>
<profiles>
<profile>
<id>default</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<dependencies>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-boot-starter</artifactId>
<version>${spring.fox.version}</version>
</dependency>
</dependencies>
</profile>
<profile>
<id>gcp</id>

Expand Down
3 changes: 0 additions & 3 deletions src/main/java/com/perales/sepomex/model/Colonia.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import com.fasterxml.jackson.annotation.JsonIdentityInfo;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
Expand Down Expand Up @@ -64,7 +63,6 @@ public class Colonia implements Serializable {
allocationSize = 10
)
@Column(name = "id")
@ApiModelProperty(notes = "ID")
private Long id;


Expand All @@ -74,7 +72,6 @@ public class Colonia implements Serializable {
@NotNull
@NotBlank
@Column(name = "nombre", nullable = false)
@ApiModelProperty(notes = "Nombre")
private String nombre;

@ManyToOne(fetch = FetchType.LAZY)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ public void indexDb() throws InterruptedException {

FullTextEntityManager fullTextEntityManager
= Search.getFullTextEntityManager(em);
fullTextEntityManager.createIndexer().startAndWait();
fullTextEntityManager.createIndexer().optimizeOnFinish(true).start();
}

public List<Colonia> search(Colonia colonia){
Expand Down
6 changes: 3 additions & 3 deletions src/main/resources/application-gcp.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
spring.jmx.enabled=false
spring.main.banner-mode=off
spring.main.lazy-initialization=true
server.undertow.threads.worker=15
server.undertow.threads.worker=60
management.health.diskspace.enabled=false
spring.servlet.multipart.max-file-size=20MB
spring.servlet.multipart.max-request-size=20MB
Expand All @@ -23,5 +23,5 @@ spring.jpa.properties.hibernate.order_inserts=true
spring.jpa.properties.hibernate.order_updates=true
spring.jpa.properties.hibernate.search.default.directory_provider=filesystem
spring.jpa.properties.hibernate.search.default.indexBase=/tmp/sepomex-indices/
spring.datasource.hikari.maximum-pool-size=10
spring.datasource.hikari.minimum-idle=5
spring.datasource.hikari.maximum-pool-size=40
spring.datasource.hikari.minimum-idle=20

0 comments on commit dec634b

Please sign in to comment.