Skip to content
Snippets Groups Projects
Commit 01650696 authored by Emmanuel Bruno's avatar Emmanuel Bruno
Browse files

first try of a skinny ear.

parents b17c522f 5f88ea4d
No related branches found
No related tags found
No related merge requests found
Showing
with 62 additions and 21 deletions
.idea
README.md
docker-compose.yml
.gitignore
*.log
# syntax=docker/dockerfile:1.3
### First we build the application in docker in a controlled env
FROM maven:3.8.3-eclipse-temurin-11 as build
FROM maven:3.8.4-eclipse-temurin-11 as build
WORKDIR /app
COPY ./ /app/
RUN --mount=type=cache,id=mvncache,target=/root/.m2/repository,rw \
mvn -B clean package
# COPY pom.xml /app/pom.xml
COPY . /app/
RUN --mount=type=cache,id=mvncache,target=/root/.m2/repository,rw \
mvn -B package
### Then we add the builded war to a JEE server.
FROM payara/server-full:5.2021.9-jdk11 as server
#FROM brunoe/payara:jdk11-6 as server
#FROM payara/server-full:5.2021.9-jdk11 as server
FROM brunoe/payara:jdk11-6 as server
ARG STORE_PASSWORD=changeit
## Download the JDBC driver
......@@ -39,11 +40,11 @@ RUN keytool -importkeystore -noprompt -destkeystore /opt/payara/appserver/glassf
#RUN wget https://github.com/eclipse-ee4j/mojarra/releases/download/2.3.17-RELEASE/jakarta.faces-2.3.17.jar \
# -O /opt/payara/appserver/glassfish/modules/jakarta.faces.jar
FROM server as production
#COPY --from=build /app/restApp/target/*.war \
#COPY --from=build /app/jee/restApp/target/*.war \
# $DEPLOY_DIR
#COPY --from=build /app/wsApp/target/*.war \
#COPY --from=build /app/jee/wsApp/target/*.war \
# $DEPLOY_DIR
#COPY --from=build /app/jsf/target/*.war \
#COPY --from=build /app/jee/jsf/target/*.war \
# $DEPLOY_DIR
COPY --from=build /app/ear/target/*.ear \
COPY --from=build /app/jee/ear/target/*.ear \
$DEPLOY_DIR
\ No newline at end of file
# FROM azul/zulu-openjdk:8u222 as mypayara
#FROM eclipse-temurin:17-jdk
FROM eclipse-temurin:11-jdk
FROM eclipse-temurin:11.0.13_8-jdk-focal
# Default payara ports to expose
# 4848: admin console
# 9009: debug port (JPDA)
# 8080: http
# 8181: https
EXPOSE 4848 9009 8080 8181
EXPOSE 4848 9009 8080 8181 8686
#ARG PAYARA_VERSION=5.2021.9
#ARG PAYARA_SHA1=81c43f3c537ec74a813b48172758866615e1e792
......
set-hazelcast-configuration --enabled=true --dynamic=true
add-library /tmp/h2.jar
create-jdbc-connection-pool --datasourceclassname org.h2.jdbcx.JdbcDataSource --restype javax.sql.ConnectionPoolDataSource --property password=password:user=user:url="jdbc:h2:tcp://db:9092/payara;MODE=PostgreSQL;DATABASE_TO_LOWER=TRUE;DEFAULT_NULL_ORDERING=HIGH" My-H2-pool
#create-jdbc-connection-pool --datasourceclassname org.h2.jdbcx.JdbcDataSource --restype javax.sql.ConnectionPoolDataSource --property password=password:user=user:url="jdbc:h2:tcp://db:9092/payara;MODE=PostgreSQL;DATABASE_TO_LOWER=TRUE;DEFAULT_NULL_ORDERING=HIGH" My-H2-pool
create-jdbc-connection-pool --datasourceclassname org.h2.jdbcx.JdbcDataSource --restype javax.sql.ConnectionPoolDataSource --property password=password:user=user:url="jdbc:h2:tcp://db:9092/payara;MODE=PostgreSQL" My-H2-pool
create-jdbc-resource --connectionpoolid My-H2-pool jdbc/my-h2-pool
# set configs.config.server-config.network-config.protocols.protocol.http-listener-2.ssl.cert-nickname=mycert
......@@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>jee9.1</artifactId>
<artifactId>parent</artifactId>
<groupId>fr.univtln.bruno.samples.jee91</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
......@@ -11,14 +11,15 @@
<artifactId>entites</artifactId>
<dependencies>
<dependency>
<groupId>jakarta.platform</groupId>
<artifactId>jakarta.jakartaee-api</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<dependency>
<groupId>jakarta.platform</groupId>
<artifactId>jakarta.jakartaee-api</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
</project>
\ No newline at end of file
......@@ -30,7 +30,7 @@
<artifactId>maven-ejb-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<ejbVersion>3.0</ejbVersion>
<ejbVersion>3.1</ejbVersion>
<generateClient>true</generateClient>
</configuration>
</plugin>
......
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="https://jakarta.ee/xml/ns/jakartaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/beans_3_0.xsd"
version="3.0"
bean-discovery-mode="all">
</beans>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>jee9.1</artifactId>
<groupId>fr.univtln.bruno.samples.jee91</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>common-persistence</artifactId>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
</build>
<dependencies>
<dependency>
<groupId>fr.univtln.bruno.samples.jee91</groupId>
<artifactId>entites</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
......@@ -5,9 +5,8 @@
version="3.0">
<persistence-unit name="myappPU" transaction-type="JTA">
<jta-data-source>jdbc/my-h2-pool</jta-data-source>
<jar-file>lib/fr.univtln.bruno.samples.jee91-entites-1.0-SNAPSHOT.jar</jar-file>
<class>fr.univtln.bruno.samples.jee91.dao.Person</class>
<validation-mode>CALLBACK</validation-mode>
<properties>
<property name="jakarta.persistence.schema-generation.database.action" value="drop-and-create" />
<property name="jakarta.persistence.schema-generation.scripts.action" value="drop-and-create" />
......
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment