docker config
This commit is contained in:
parent
753828ff25
commit
5ca788b801
12
Dockerfile
12
Dockerfile
|
@ -1,7 +1,6 @@
|
|||
#FROM d4science/smartgears-distribution:4.0.0-SNAPSHOT-java11-tomcat9
|
||||
FROM smartgears-distribution:4.0.0-java11-tomcat9-devel
|
||||
|
||||
|
||||
ARG REPOUSER=admin
|
||||
ARG REPOPWD=admin
|
||||
# COPY ./target/identity-manager.war /tomcat/webapps/
|
||||
|
@ -14,10 +13,13 @@ ARG REPOPWD=admin
|
|||
COPY ./docker/logback.xml /etc/
|
||||
COPY ./docker/container.ini /etc/
|
||||
|
||||
# [optional] add tomcat managers
|
||||
# http://localhost:8080/manager/text/list
|
||||
# credenziali my_user - mypass
|
||||
COPY ./docker/tomcat-users.xml /tomcat/conf/tomcat-users.xml
|
||||
# RUN cp -a /usr/local/tomcat/webapps.dist/docs /usr/local/tomcat/webapps
|
||||
# RUN cp -a /usr/local/tomcat/webapps.dist/examples /usr/local/tomcat/webapps
|
||||
# RUN cp -a /usr/local/tomcat/webapps.dist/host-manager /usr/local/tomcat/webapps
|
||||
# RUN cp -a /usr/local/tomcat/webapps.dist/manager /usr/local/tomcat/webapps
|
||||
# RUN cp -a /usr/local/tomcat/webapps.dist/ROOT /usr/local/tomcat/webapps
|
||||
|
||||
RUN cp -a /usr/local/tomcat/webapps.dist/* /usr/local/tomcat/webapps
|
||||
|
||||
# RUN unzip /tomcat/webapps/identity-manager.war -d /tomcat/webapps/identity-manager
|
||||
# RUN unzip /usr/local/tomcat/webapps/identity-manager.war -d /usr/local/tomcat/webapps/identity-manager
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
mvn clean package
|
||||
rm -f tomcat/logs/*.log
|
||||
docker compose up -d --build --force-recreate
|
||||
|
||||
curl http://localhost:8080/identity-manager/gcube/resource/health
|
||||
# curl http://localhost:8080/identity-manager/gcube/resource/health
|
|
@ -0,0 +1,11 @@
|
|||
echo "deploying tomcat with tomcat/manager applications"
|
||||
|
||||
mkdir tomcat/logs
|
||||
mkdir tomcat/webapps
|
||||
|
||||
rm -fr tomcat/webapps
|
||||
touch tomcat/logs
|
||||
touch tomcat/webapps
|
||||
|
||||
cp -a tomcat/manager tomcat/webapps
|
||||
./deploy.sh
|
|
@ -0,0 +1,3 @@
|
|||
|
||||
rm -fr tomcat/webapps
|
||||
deploy.sh
|
|
@ -5,7 +5,5 @@ docker compose up -d --build --force-recreate
|
|||
# senza composer
|
||||
#docker run -it -d -p 8080:8080 --name idm idm
|
||||
|
||||
|
||||
|
||||
# controllare servizio
|
||||
curl http://localhost:8080/identity-manager/gcube/resource/health
|
||||
curl http://localhost:8080/identity-manager/gcube/resource/health
|
||||
|
|
|
@ -19,7 +19,8 @@ location = pisa
|
|||
factory = org.gcube.smartgears.security.defaults.DefaultAuthorizationProviderFactory
|
||||
factory.endpoint = https://accounts.dev.d4science.org/auth/realms/d4science/protocol/openid-connect/token
|
||||
credentials.class = org.gcube.smartgears.security.SimpleCredentials
|
||||
client_id = alfredo-idm-service-dev
|
||||
client_secret = 979bd3bc-5cc4-11ec-bf63-0242ac130002
|
||||
credentials.client_id = alfredo-idm-service-dev
|
||||
credentials.client_secret = 979bd3bc-5cc4-11ec-bf63-0242ac130002
|
||||
|
||||
; credentials.clientID = node-whn-test-uno-d-d4s.d4science.org
|
||||
; credentials.secret = 979bd3bc-5cc4-11ec-bf63-0242ac130002
|
|
@ -0,0 +1,12 @@
|
|||
<tomcat-users>
|
||||
<role rolename="manager-gui" />
|
||||
<role rolename="manager-script" />
|
||||
<role rolename="manager-jmx" />
|
||||
<role rolename="manager-status" />
|
||||
<role rolename="admin-gui" />
|
||||
<role rolename="admin-script" />
|
||||
|
||||
<user username="my_user" password="my_pass"
|
||||
roles="manager-gui,manager-script,manager-jmx,manager-status,admin-gui,admin-script" />
|
||||
|
||||
</tomcat-users>
|
|
@ -1,15 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<web-app>
|
||||
<context-param>
|
||||
<param-name>resolver-basepath</param-name>
|
||||
<param-value>https://data-d.d4science.org/shub</param-value>
|
||||
</context-param>
|
||||
<servlet>
|
||||
<servlet-name>IDM</servlet-name>
|
||||
<servlet-class>org.gcube.idm.IdentityManagerResourceInitializer</servlet-class>
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>IDM</servlet-name>
|
||||
<url-pattern>/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
</web-app>
|
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
|
||||
http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
|
||||
version="4.0"
|
||||
metadata-complete="true">
|
||||
<display-name>Identity Manager Service</display-name>
|
||||
<description>
|
||||
A gcube service - smartgears 4
|
||||
</description>
|
||||
|
||||
<context-param>
|
||||
<param-name>resolver-basepath</param-name>
|
||||
<param-value>https://data-d.d4science.org/shub</param-value>
|
||||
</context-param>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>IDM</servlet-name>
|
||||
<servlet-class>org.gcube.idm.IdentityManagerResourceInitializer</servlet-class>
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>IDM</servlet-name>
|
||||
<url-pattern>/identity-manager/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
</web-app>
|
Loading…
Reference in New Issue