mirror of
https://github.com/OpenLiberty/liberty-bikes.git
synced 2025-02-17 11:09:39 +08:00
Initial updates to JEE10 and MP6 + OL updates
This commit is contained in:
parent
c0f296a567
commit
cb7941b403
@ -50,7 +50,7 @@ subprojects {
|
||||
apply plugin: 'liberty'
|
||||
apply plugin: 'war'
|
||||
|
||||
sourceCompatibility = 1.8
|
||||
sourceCompatibility = 11
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
@ -66,11 +66,11 @@ subprojects {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
providedCompile group: 'org.eclipse.microprofile', name: 'microprofile', version: '3.0'
|
||||
providedCompile group: 'jakarta.platform', name: 'jakarta.jakartaee-api', version: '8.0.0'
|
||||
providedCompile group: 'org.eclipse.microprofile', name: 'microprofile', version: '6.0'
|
||||
providedCompile group: 'jakarta.platform', name: 'jakarta.jakartaee-api', version: '10.0.0'
|
||||
testImplementation group: 'junit', name: 'junit', version: '4.13.1'
|
||||
testImplementation group: 'org.eclipse', name: 'yasson', version: '1.0.8'
|
||||
libertyRuntime group: 'io.openliberty', name: 'openliberty-runtime', version: '22.0.0.12'
|
||||
libertyRuntime group: 'io.openliberty', name: 'openliberty-runtime', version: '23.0.0.5'
|
||||
}
|
||||
|
||||
eclipse {
|
||||
|
@ -1,26 +1,5 @@
|
||||
version: '2.1'
|
||||
services:
|
||||
frontend:
|
||||
build: frontend
|
||||
image: libertybikes-frontend
|
||||
ports:
|
||||
- "12000:12000"
|
||||
auth:
|
||||
build: auth-service
|
||||
image: libertybikes-auth
|
||||
ports:
|
||||
- "8082:8082"
|
||||
environment:
|
||||
- frontend_url=http://frontend:12000/login
|
||||
- auth_url=https://auth:8482/auth-service
|
||||
game:
|
||||
build: game-service
|
||||
image: libertybikes-game
|
||||
ports:
|
||||
- "8080:8080"
|
||||
environment:
|
||||
- org_libertybikes_restclient_PlayerService_mp_rest_url=http://player:8081
|
||||
- singleParty
|
||||
player:
|
||||
build: player-service
|
||||
image: libertybikes-player
|
||||
@ -28,27 +7,3 @@ services:
|
||||
- "8081:8081"
|
||||
environment:
|
||||
- DB_HOST=postgres
|
||||
postgres:
|
||||
image: postgres:11-alpine
|
||||
ports:
|
||||
- 5432:5432
|
||||
environment:
|
||||
- POSTGRES_DB=playerdb
|
||||
- POSTGRES_USER=lb_user
|
||||
- POSTGRES_PASSWORD=lb_password
|
||||
prometheus:
|
||||
image: prom/prometheus:v2.4.0
|
||||
ports:
|
||||
- 9090:9090
|
||||
volumes:
|
||||
- ./monitoring/prometheus:/etc/prometheus
|
||||
grafana:
|
||||
image: grafana/grafana:5.2.4
|
||||
ports:
|
||||
- 3000:3000
|
||||
environment:
|
||||
- GF_INSTALL_PLUGINS=flant-statusmap-panel
|
||||
volumes:
|
||||
- ./monitoring/datasource:/etc/grafana/provisioning/datasources
|
||||
- ./monitoring/dashboardList:/etc/grafana/provisioning/dashboards
|
||||
- ./monitoring/grafanaDashboardConfig:/var/lib/grafana/dashboards
|
||||
|
@ -1,8 +1,9 @@
|
||||
FROM open-liberty:19.0.0.9-microProfile3-java11
|
||||
FROM icr.io/appcafe/open-liberty:kernel-slim-java11-openj9-ubi
|
||||
ADD --chown=1001:0 build/libs/player-service.war /config/dropins
|
||||
ADD --chown=1001:0 build/libs/postgresql-*.jar /config/postgresql
|
||||
COPY --chown=1001:0 src/main/liberty/config /config/
|
||||
RUN printf 'httpPort=8081\n\
|
||||
httpsPort=8444' > /config/bootstrap.properties
|
||||
RUN configure.sh
|
||||
|
||||
EXPOSE 8081 8444
|
@ -3,8 +3,8 @@
|
||||
*/
|
||||
package org.libertybikes.player.data;
|
||||
|
||||
import javax.enterprise.context.ApplicationScoped;
|
||||
import javax.enterprise.inject.Produces;
|
||||
import jakarta.enterprise.context.ApplicationScoped;
|
||||
import jakarta.enterprise.inject.Produces;
|
||||
|
||||
@ApplicationScoped
|
||||
public class PlayerDBProducer {
|
||||
|
@ -2,10 +2,10 @@ package org.libertybikes.player.service;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.ws.rs.container.ContainerRequestContext;
|
||||
import javax.ws.rs.container.ContainerResponseContext;
|
||||
import javax.ws.rs.container.ContainerResponseFilter;
|
||||
import javax.ws.rs.ext.Provider;
|
||||
import jakarta.ws.rs.container.ContainerRequestContext;
|
||||
import jakarta.ws.rs.container.ContainerResponseContext;
|
||||
import jakarta.ws.rs.container.ContainerResponseFilter;
|
||||
import jakarta.ws.rs.ext.Provider;
|
||||
|
||||
@Provider
|
||||
public class CORSFilter implements ContainerResponseFilter {
|
||||
|
@ -1,10 +1,10 @@
|
||||
package org.libertybikes.player.service;
|
||||
|
||||
import javax.json.bind.Jsonb;
|
||||
import javax.json.bind.JsonbBuilder;
|
||||
import javax.json.bind.annotation.JsonbCreator;
|
||||
import javax.json.bind.annotation.JsonbProperty;
|
||||
import javax.json.bind.annotation.JsonbTransient;
|
||||
import jakarta.json.bind.Jsonb;
|
||||
import jakarta.json.bind.JsonbBuilder;
|
||||
import jakarta.json.bind.annotation.JsonbCreator;
|
||||
import jakarta.json.bind.annotation.JsonbProperty;
|
||||
import jakarta.json.bind.annotation.JsonbTransient;
|
||||
|
||||
public class Player {
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
package org.libertybikes.player.service;
|
||||
|
||||
import javax.ws.rs.ApplicationPath;
|
||||
import javax.ws.rs.core.Application;
|
||||
import jakarta.ws.rs.ApplicationPath;
|
||||
import jakarta.ws.rs.core.Application;
|
||||
|
||||
@ApplicationPath("/")
|
||||
public class PlayerApp extends Application {
|
||||
|
@ -3,15 +3,15 @@ package org.libertybikes.player.service;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
|
||||
import javax.enterprise.context.ApplicationScoped;
|
||||
import javax.inject.Inject;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.POST;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.PathParam;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.QueryParam;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import jakarta.enterprise.context.ApplicationScoped;
|
||||
import jakarta.inject.Inject;
|
||||
import jakarta.ws.rs.GET;
|
||||
import jakarta.ws.rs.POST;
|
||||
import jakarta.ws.rs.Path;
|
||||
import jakarta.ws.rs.PathParam;
|
||||
import jakarta.ws.rs.Produces;
|
||||
import jakarta.ws.rs.QueryParam;
|
||||
import jakarta.ws.rs.core.MediaType;
|
||||
|
||||
import org.eclipse.microprofile.jwt.JsonWebToken;
|
||||
import org.eclipse.microprofile.metrics.Metadata;
|
||||
|
@ -4,19 +4,19 @@ import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Random;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.annotation.security.RolesAllowed;
|
||||
import javax.enterprise.context.ApplicationScoped;
|
||||
import javax.inject.Inject;
|
||||
import javax.ws.rs.DefaultValue;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.HeaderParam;
|
||||
import javax.ws.rs.POST;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.PathParam;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.QueryParam;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import jakarta.annotation.PostConstruct;
|
||||
import jakarta.annotation.security.RolesAllowed;
|
||||
import jakarta.enterprise.context.ApplicationScoped;
|
||||
import jakarta.inject.Inject;
|
||||
import jakarta.ws.rs.DefaultValue;
|
||||
import jakarta.ws.rs.GET;
|
||||
import jakarta.ws.rs.HeaderParam;
|
||||
import jakarta.ws.rs.POST;
|
||||
import jakarta.ws.rs.Path;
|
||||
import jakarta.ws.rs.PathParam;
|
||||
import jakarta.ws.rs.Produces;
|
||||
import jakarta.ws.rs.QueryParam;
|
||||
import jakarta.ws.rs.core.MediaType;
|
||||
|
||||
import org.libertybikes.player.data.PlayerDB;
|
||||
|
||||
|
@ -1,11 +0,0 @@
|
||||
#!/bin/sh
|
||||
# This script installs the required features when the server is deployed as a Cloud Foundry application
|
||||
export PATH=$PATH:$HOME/.java/jre/bin
|
||||
echo "Path is $PATH"
|
||||
java -version
|
||||
|
||||
export WLP_USER_DIR=$HOME/wlp/usr
|
||||
echo "WLP_USER_DIR is $WLP_USER_DIR"
|
||||
|
||||
echo "Installing required features for server..."
|
||||
$HOME/.liberty/bin/installUtility install webProfile-8.0 microProfile-2.0 --acceptLicense
|
@ -1,17 +1,20 @@
|
||||
<server>
|
||||
<featureManager>
|
||||
<feature>appSecurity-3.0</feature>
|
||||
<feature>cdi-2.0</feature>
|
||||
<feature>concurrent-1.0</feature>
|
||||
<feature>jaxrs-2.1</feature>
|
||||
<feature>jdbc-4.2</feature>
|
||||
<feature>appSecurity-5.0</feature>
|
||||
<feature>concurrent-3.0</feature>
|
||||
<feature>jdbc-4.3</feature>
|
||||
<feature>jndi-1.0</feature>
|
||||
<feature>jsonb-1.0</feature>
|
||||
<feature>mpConfig-1.3</feature>
|
||||
<feature>mpJwt-1.1</feature>
|
||||
<feature>mpOpenAPI-1.1</feature>
|
||||
<feature>mpMetrics-2.0</feature>
|
||||
<feature>restConnector-2.0</feature>
|
||||
<feature>cdi-4.0</feature>
|
||||
<feature>restfulws-3.1</feature>
|
||||
<feature>jndi-1.0</feature>
|
||||
<feature>jsonb-3.0</feature>
|
||||
<feature>mpConfig-3.0</feature>
|
||||
<feature>mpJwt-2.1</feature>
|
||||
<feature>mpRestClient-3.0</feature>
|
||||
<feature>mpOpenAPI-3.1</feature>
|
||||
<feature>mpMetrics-5.0</feature>
|
||||
<feature>mpTelemetry-1.0</feature>
|
||||
<feature>xmlBinding-4.0</feature>
|
||||
</featureManager>
|
||||
|
||||
<mpMetrics authentication="false"/>
|
||||
|
Loading…
Reference in New Issue
Block a user