Converting to jakarta and podman from docker

This commit is contained in:
Jakub Pomykala 2024-05-20 21:36:53 +01:00
parent 5d7f8a09be
commit b4f1d49444
No known key found for this signature in database
GPG Key ID: 130159A385209028
18 changed files with 86 additions and 85 deletions

View File

@ -1,4 +1,5 @@
FROM open-liberty:19.0.0.9-microProfile3-java11
FROM icr.io/appcafe/open-liberty:full-java11-openj9-ubi
ADD --chown=1001:0 build/libs/auth-service.war /config/dropins
COPY --chown=1001:0 src/main/liberty/config /config/
RUN printf 'frontend_url=http://lb-frontend:12000/login\n\

View File

@ -1,7 +1,7 @@
package org.libertybikes.auth.service;
import javax.ws.rs.ApplicationPath;
import javax.ws.rs.core.Application;
import jakarta.enterprise.context.ApplicationPath;
import jakarta.ws.rs.core.Application;
@ApplicationPath("/")
public class AuthApp extends Application {}

View File

@ -2,12 +2,12 @@ package org.libertybikes.auth.service;
import java.util.Set;
import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import jakarta.enterprise.context.ApplicationScoped;
import jakarta.enterprise.inject;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.core.MediaType;
@Path("/")
@ApplicationScoped

View File

@ -1,6 +1,6 @@
package org.libertybikes.auth.service;
import javax.enterprise.inject.Stereotype;
import jakarta.enterprise.inject.Stereotype;
@Stereotype
public @interface BeanDefiner {}

View File

@ -2,10 +2,10 @@ package org.libertybikes.auth.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 {

View File

@ -3,9 +3,9 @@ package org.libertybikes.auth.service;
import java.util.HashSet;
import java.util.Set;
import javax.annotation.PostConstruct;
import javax.inject.Inject;
import javax.inject.Singleton;
import jakarta.annotation.PostConstruct;
import jakarta.enterprise.inject;
import jakarta.inject.Singleton;
import org.eclipse.microprofile.config.inject.ConfigProperty;
import org.libertybikes.auth.service.github.GitHubAuth;

View File

@ -8,8 +8,8 @@ import java.security.KeyStore;
import java.util.Calendar;
import java.util.Map;
import javax.annotation.Resource;
import javax.inject.Inject;
import jakarta.annotation.Resource;
import jakarta.enterprise.inject;
import org.eclipse.microprofile.config.inject.ConfigProperty;

View File

@ -3,13 +3,13 @@ package org.libertybikes.auth.service.github;
import java.net.URI;
import java.util.UUID;
import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;
import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.Response;
import jakarta.enterprise.context.ApplicationScoped;
import jakarta.enterprise.inject;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.core.Context;
import jakarta.ws.rs.core.Response;
import org.libertybikes.auth.service.ConfigBean;

View File

@ -7,16 +7,16 @@ import java.util.Map;
import java.util.Objects;
import java.util.Set;
import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;
import javax.servlet.http.HttpServletRequest;
import javax.validation.ConstraintViolation;
import javax.validation.ConstraintViolationException;
import javax.validation.Validator;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.Response;
import jakarta.enterprise.context.ApplicationScoped;
import jakarta.enterprise.inject;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.validation.ConstraintViolation;
import jakarta.validation.ConstraintViolationException;
import jakarta.validation.Validator;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.core.Context;
import jakarta.ws.rs.core.Response;
import org.eclipse.microprofile.metrics.annotation.Counted;
import org.libertybikes.auth.service.ConfigBean;

View File

@ -1,10 +1,10 @@
package org.libertybikes.auth.service.github;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.QueryParam;
import jakarta.ws.rs.core.MediaType;
import org.eclipse.microprofile.openapi.annotations.Operation;
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;

View File

@ -1,10 +1,10 @@
package org.libertybikes.auth.service.github;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.QueryParam;
import jakarta.ws.rs.core.MediaType;
import org.eclipse.microprofile.openapi.annotations.Operation;
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;

View File

@ -3,13 +3,13 @@ package org.libertybikes.auth.service.google;
import java.net.URI;
import java.util.Arrays;
import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;
import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.Response;
import jakarta.enterprise.context.ApplicationScoped;
import jakarta.enterprise.inject;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.core.Context;
import jakarta.ws.rs.core.Response;
import org.libertybikes.auth.service.ConfigBean;

View File

@ -7,16 +7,16 @@ import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;
import javax.json.bind.Jsonb;
import javax.json.bind.JsonbBuilder;
import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import jakarta.enterprise.context.ApplicationScoped;
import jakarta.enterprise.inject;
import jakarta.json.bind.Jsonb;
import jakarta.json.bind.JsonbBuilder;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.core.Context;
import jakarta.ws.rs.core.MediaType;
import jakarta.ws.rs.core.Response;
import org.eclipse.microprofile.metrics.annotation.Counted;
import org.libertybikes.auth.service.ConfigBean;

View File

@ -2,13 +2,13 @@ package org.libertybikes.auth.service.twitter;
import java.net.URI;
import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;
import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.Response;
import jakarta.enterprise.context.ApplicationScoped;
import jakarta.enterprise.inject;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.core.Context;
import jakarta.ws.rs.core.Response;
import org.libertybikes.auth.service.ConfigBean;

View File

@ -5,13 +5,13 @@ import java.net.URISyntaxException;
import java.util.HashMap;
import java.util.Map;
import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;
import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.Response;
import jakarta.enterprise.context.ApplicationScoped;
import jakarta.enterprise.inject;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.core.Context;
import jakarta.ws.rs.core.Response;
import org.eclipse.microprofile.metrics.annotation.Counted;
import org.libertybikes.auth.service.ConfigBean;

View File

@ -50,7 +50,7 @@ subprojects {
apply plugin: 'liberty'
apply plugin: 'war'
sourceCompatibility = 11
sourceCompatibility = 17
buildscript {
repositories {
@ -70,7 +70,7 @@ subprojects {
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: '23.0.0.5'
libertyRuntime group: 'io.openliberty', name: 'openliberty-runtime', version: '24.0.0.4'
}
eclipse {

View File

@ -1,8 +1,8 @@
#!/bin/bash
echo "Starting postgresql database"
docker stop lb-postgresql 2> /dev/null
docker run \
podman stop lb-postgresql 2> /dev/null
podman run \
--name lb-postgresql \
--rm \
-d \

View File

@ -16,8 +16,8 @@ sed \
$PROM_LOCAL_CONFIG/prometheus.yml
echo "Starting prometheus"
docker stop lb-prometheus 2> /dev/null
docker run \
podman stop lb-prometheus 2> /dev/null
podman run \
--name lb-prometheus \
--rm \
-d \
@ -26,8 +26,8 @@ docker run \
prom/prometheus:v2.4.0
echo "Starting grafana"
docker stop lb-grafana 2> /dev/null
docker run \
podman stop lb-grafana 2> /dev/null
podman run \
--name lb-grafana \
--rm \
-d \