diff --git a/docker-compose.yml b/docker-compose.yml index bebf0d1..ffda22b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -21,6 +21,7 @@ services: image: in-sylva.keycloak:latest container_name: in-sylva.keycloak environment: + network.host: 0.0.0.0 DB_VENDOR: POSTGRES DB_ADDR: postgres DB_DATABASE: keycloak @@ -187,10 +188,16 @@ services: DB_PASSWORD: v2kGBDUaGjXK2VuPyf5R64VS DB_DATABASE: insylva PORT: 4000 - IN_SYLVA_KEYCLOAK_HOST: http://in-sylva.keycloak - IN_SYLVA_KEYCLOAK_PORT: 7000 + IN_SYLVA_KEYCLOAK_HOST: http://keycloak + IN_SYLVA_KEYCLOAK_PORT: 8080 + KEYCLOAK_USERNAME: insylva_admin + KEYCLOAK_PASSWORD: v2kGBDUaGjXK2VuPyf5R64VS + KEYCLOAK_GRANT_TYPE: password + KEYCLOAK_CLIENT_ID: client_id networks: - app-network + links: + - keycloak restart: unless-stopped source-manager: diff --git a/keycloak/Dockerfile b/keycloak/Dockerfile index 01be846..60ca421 100644 --- a/keycloak/Dockerfile +++ b/keycloak/Dockerfile @@ -1,4 +1,4 @@ -FROM registry.access.redhat.com/ubi8-minimal +FROM centos:latest ENV KEYCLOAK_VERSION 9.0.0 ENV JDBC_POSTGRES_VERSION 42.2.5 @@ -6,11 +6,10 @@ ENV JDBC_MYSQL_VERSION 5.1.46 ENV JDBC_MARIADB_VERSION 2.2.3 ENV JDBC_MSSQL_VERSION 7.4.1.jre11 -ENV LAUNCH_JBOSS_IN_BACKGROUND=1 -ENV PROXY_ADDRESS_FORWARDING=true +ENV LAUNCH_JBOSS_IN_BACKGROUND 1 +ENV PROXY_ADDRESS_FORWARDING true ENV JBOSS_HOME /opt/jboss/keycloak ENV LANG en_US.UTF-8 -ENV network.host=0.0.0.0 ARG GIT_REPO ARG GIT_BRANCH @@ -18,12 +17,16 @@ ARG KEYCLOAK_DIST=https://downloads.jboss.org/keycloak/$KEYCLOAK_VERSION/keycloa USER root -RUN microdnf update -y && microdnf install -y gzip hostname java-11-openjdk-headless openssl tar which && microdnf clean all +RUN yum update -y && yum install -y gzip hostname java-11-openjdk-headless openssl tar which && yum clean all ADD tools /opt/jboss/tools RUN /opt/jboss/tools/build-keycloak.sh -USER 1000 +RUN sed -i -e 's/auth<\/web-context>/keycloak\/auth<\/web-context>/' $JBOSS_HOME/standalone/configuration/standalone.xml +RUN sed -i -e 's/auth<\/web-context>/keycloak\/auth<\/web-context>/' $JBOSS_HOME/standalone/configuration/standalone-ha.xml +RUN sed -i -e 's/name="\/"/name="\/keycloak\/"/' $JBOSS_HOME/standalone/configuration/standalone.xml +RUN sed -i -e 's/name="\/"/name="\/keycloak\/"/' $JBOSS_HOME/standalone/configuration/standalone-ha.xml +RUN sed -i -e 's/\/auth/\/keycloak\/auth"/' $JBOSS_HOME/welcome-content/index.html EXPOSE 8080 EXPOSE 8443 diff --git a/portal/Dockerfile b/portal/Dockerfile index c3106fd..e0e517b 100644 --- a/portal/Dockerfile +++ b/portal/Dockerfile @@ -40,12 +40,14 @@ RUN yarn build # production environment FROM nginx:latest -RUN apt-get update && apt-get install wget -y +RUN apt-get update && apt-get install wget && apt-get install telnet -y RUN apt-get install iputils-ping -y RUN apt-get update && apt-get install nginx-extras -y +RUN apt-get install telnet + ARG REACT_APP_IN_SYLVA_GATEKEEPER_HOST ARG REACT_APP_IN_SYLVA_GATEKEEPER_PORT ARG REACT_APP_IN_SYLVA_SOURCE_MANAGER_HOST diff --git a/portal/nginx/nginx.conf b/portal/nginx/nginx.conf index 94e4246..efcdbe8 100644 --- a/portal/nginx/nginx.conf +++ b/portal/nginx/nginx.conf @@ -10,7 +10,7 @@ upstream backend_gatekeeper { upstream backend_keycloak { hash $remote_addr$remote_port consistent; - server keycloak:7000; + server keycloak:8080; } upstream backend_source_manager {