-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1578ba6
commit 68b18ec
Showing
141 changed files
with
7,570 additions
and
1,067 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,48 @@ | ||
FROM tomcat:9-jre17 | ||
|
||
RUN rm -rf $CATALINA_HOME/webapps/* | ||
ADD config/ $CATALINA_HOME/webapps/ | ||
ADD ./target/*.war $CATALINA_HOME/webapps/rmesstromae.war | ||
|
||
COPY ./script/env.sh $CATALINA_HOME | ||
RUN chmod 755 $CATALINA_HOME/env.sh | ||
ARG TOMCAT_VERSION=9.0.91-jre17-temurin-jammy | ||
FROM tomcat:${TOMCAT_VERSION} | ||
|
||
# Ajout securité tomcat | ||
RUN sed -i 's/<\/Host>/<Valve className="org.apache.catalina.valves.RemoteIpValve" remoteIpHeader="X-Forwarded-For" protocolHeader="X-Scheme"\/><\/Host>/' /usr/local/tomcat/conf/server.xml | ||
RUN sed -i 's/<Connector port="8080" protocol="HTTP\/1.1"/<Connector port="8080" protocol="HTTP\/1.1"\n server="unknown"/' /usr/local/tomcat/conf/server.xml | ||
RUN sed -i 's/pattern="%h %l %u %t "%r" %s %b"/pattern="%h %l %u %t %r %s %b %D %{Referer}i %{User-Agent}i"/' /usr/local/tomcat/conf/server.xml | ||
RUN sed -i 's/autoDeploy="true"/autoDeploy="false"/' /usr/local/tomcat/conf/server.xml | ||
RUN sed -i 's/<Server port="8005" shutdown="SHUTDOWN">/<Server port="-1" shutdown="Super1mpr3viSible">/' /usr/local/tomcat/conf/server.xml | ||
|
||
# Add WAR (application) | ||
COPY ./target/*.war /usr/local/tomcat/webapps/rmesstromae.war | ||
|
||
# Add configuration files (log4j, props & empty license.xml) | ||
COPY ./conf/log4j2.xml /usr/local/tomcat/webapps/properties/config/log4j2.xml | ||
COPY ./conf/properties-local-prod.xml /usr/local/tomcat/webapps/properties/config/properties-local-prod.xml | ||
COPY ./conf/license.xml /home/tomcat/.orbeon/license.xml | ||
# Add entrypoint.sh | ||
COPY ./scripts/entrypoint.sh /usr/local/tomcat/entrypoint.sh | ||
|
||
# Ajout user tomcat pour non root | ||
RUN groupadd -g 10001 tomcat | ||
RUN useradd tomcat -u 10001 -g 10001 -ms /bin/bash | ||
ENV TOMCAT_USER_ID=10001 | ||
ENV TOMCAT_USER=tomcat | ||
|
||
RUN chown tomcat: /usr/local/tomcat -R | ||
ENV JAVA_TOOL_OPTIONS_DEFAULT \ | ||
-XX:MaxRAMPercentage=75 \ | ||
-XX:+UseZGC | ||
|
||
RUN groupadd -g $TOMCAT_USER_ID $TOMCAT_USER | ||
RUN useradd $TOMCAT_USER -u $TOMCAT_USER_ID -g $TOMCAT_USER_ID -ms /bin/bash | ||
|
||
RUN chown $TOMCAT_USER: /usr/local/tomcat -R | ||
RUN chmod 750 /usr/local/tomcat -R | ||
RUN chown $TOMCAT_USER: /home/tomcat/.orbeon -R | ||
|
||
USER tomcat | ||
# give write permission to write in properties folder | ||
RUN chmod 755 /usr/local/tomcat/entrypoint.sh | ||
RUN chmod 755 /usr/local/tomcat/webapps/properties -R | ||
RUN chmod 755 /home/tomcat/.orbeon -R | ||
|
||
USER $TOMCAT_USER_ID | ||
|
||
EXPOSE 8080 | ||
EXPOSE 8443 | ||
|
||
CMD ["/bin/bash", "-c", "$CATALINA_HOME/env.sh && catalina.sh run"] | ||
|
||
CMD ["/bin/bash", "-c", \ | ||
"export JAVA_TOOL_OPTIONS=\"$JAVA_TOOL_OPTIONS_DEFAULT $JAVA_TOOL_OPTIONS\"; \ | ||
$CATALINA_HOME/entrypoint.sh && catalina.sh run" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,14 @@ | ||
# Stromae | ||
|
||
Data collection services for XForms questionnaires powered by Orbeon. | ||
Data collection services for XForms questionnaires powered by Orbeon. | ||
|
||
This project takes the PE version (under license) of orbeon from GitHub and adds the developments made by the Insee team to make the xforms questionnaires produced by Eno functional. | ||
|
||
This project uses orbeon version 2022.1.6. | ||
|
||
Unfortunately, there isn't (yet?) a version of orbeon that works properly with our xforms questionnaires. | ||
A license is therefore required. | ||
|
||
The license is in the [~/.orbeon/license.xml] folder. It is set at deployment by the `ORBEON_LICENSE` environment variable. | ||
|
||
So yo need a license to run this app. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<signed-data>empty</signed-data> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<Configuration monitorInterval="60"> | ||
<Appenders> | ||
<Console name="Console-Appender" target="SYSTEM_OUT"> | ||
<PatternLayout> | ||
<pattern> | ||
[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %c{1} - %msg%n | ||
</pattern> | ||
</PatternLayout> | ||
</Console> | ||
</Appenders> | ||
<Loggers> | ||
<Root level="info" additivity="false"> | ||
<AppenderRef ref="Console-Appender" /> | ||
</Root> | ||
</Loggers> | ||
</Configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<properties xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:oxf="http://www.orbeon.com/oxf/processors"> | ||
<!--********************************Les proprietes existantes d'orbeon********************************--> | ||
<!-- Le chemin vers la collection qui va abriter les formulaires qui vont etre traites par orbeon (avec id et mdp de connexion)--> | ||
<property as="xs:anyURI" name="oxf.fr.persistence.exist.exist-uri" value="$STROMAE_DB_URL/$ORBEON_EXIST_COLLECTION"/> | ||
<!-- L'url vers coltorb pour la redirection des services orbeon (bien indiquer l'adresse du serveur et pas l'url accedee) --> | ||
<property as="xs:anyURI" name="oxf.url-rewriting.service.base-uri" value="$STROMAE_HOST"/> | ||
<!--********************************Les propretes creees par coltrane********************************--> | ||
<!-- L'url de base pour la redirection vers l'url orbeon --> | ||
<property as="xs:anyURI" name="url-orbeon" value="$STROMAE_HOST"/> | ||
<property as="xs:anyURI" name="url-orbeon-s" value="$STROMAE_HOST"/> | ||
<!-- L'adresse du serveur exist (avec id et mdp de connexion) --> | ||
<property as="xs:anyURI" name="server-exist-orbeon" value="$STROMAE_DB_URL/$ORBEON_EXIST"/> | ||
<!-- Affichage du numero de version --> | ||
<property as="xs:boolean" name="affichage-numero" value="true"/> | ||
<property as="xs:string" name="insee-context" value="default"/> | ||
</properties> |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
Oops, something went wrong.