aggiunta gestione multitenant
ristrutturazione cartelle
This commit is contained in:
parent
28b7dc7a27
commit
566a29d2fc
@ -2,8 +2,7 @@
|
||||
|
||||
CONTAINER PER ADHOC INFINITY E ADHOC REVOLUTION WEB VERSIONE 4.2
|
||||
|
||||
|
||||
1) eseguire lo script script_init
|
||||
2) impostare utente esecutore del tomcat in docker-compose (settare UID/GUID e nome utente e gruppo)
|
||||
2) configurare apache.conf in apache/conf
|
||||
3) deploy con docker-compose up --build -d
|
||||
3) deploy con docker-compose -f <TIPO_INSTALLAZIONE> up --build -d
|
||||
22
docker-compose-multi.yml
Normal file
22
docker-compose-multi.yml
Normal file
@ -0,0 +1,22 @@
|
||||
#installazione multitenant, senza apache proxy
|
||||
services:
|
||||
tomcat:
|
||||
build:
|
||||
context: ./tomcat
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
USER_ID: 1000
|
||||
GROUP_ID: 1000
|
||||
USERNAME: polo
|
||||
GROUPNAME: polo
|
||||
container_name: tomcat
|
||||
ports:
|
||||
- "x009:8009" #inoltro porta ajp, lasciato errato volontariamente
|
||||
volumes:
|
||||
- ./tomcat/webapps:/usr/local/tomcat/webapps
|
||||
- ./tomcat/logs:/usr/local/tomcat/logs
|
||||
environment:
|
||||
JAVA_OPTS: "-Dfile.encoding=UTF-8 -Xms1g -Xmx4g -XX:MetaspaceSize=512m -XX:MaxMetaspaceSize=1g -Djava.security.egd=file:/dev/./urandom -Djava.awt.headless=true"
|
||||
CATALINA_OPTS: "-XX:CompressedClassSpaceSize=512m -XX:+UseCompressedOops -XX:+UseCompressedClassPointers -Xss2m -XX:+UseG1GC -XX:+UnlockExperimentalVMOptions -XX:+AlwaysPreTouch -XX:+UseStringDeduplication -XX:ParallelGCThreads=4 -XX:ConcGCThreads=2 -XX:+DisableExplicitGC"
|
||||
TZ: "Europe/Rome"
|
||||
restart: always
|
||||
@ -1,3 +1,4 @@
|
||||
#installazione singolo tenant con apache incluso
|
||||
services:
|
||||
tomcat:
|
||||
build:
|
||||
@ -11,8 +12,8 @@ services:
|
||||
container_name: tomcat
|
||||
network_mode: host
|
||||
volumes:
|
||||
- ./tomcat/tomcat_webapps:/usr/local/tomcat/webapps
|
||||
- ./tomcat/tomcat_logs:/usr/local/tomcat/logs
|
||||
- ./tomcat/webapps:/usr/local/tomcat/webapps
|
||||
- ./tomcat/logs:/usr/local/tomcat/logs
|
||||
environment:
|
||||
JAVA_OPTS: "-Dfile.encoding=UTF-8 -Xms1g -Xmx4g -XX:MetaspaceSize=512m -XX:MaxMetaspaceSize=1g -Djava.security.egd=file:/dev/./urandom -Djava.awt.headless=true"
|
||||
CATALINA_OPTS: "-XX:CompressedClassSpaceSize=512m -XX:+UseCompressedOops -XX:+UseCompressedClassPointers -Xss2m -XX:+UseG1GC -XX:+UnlockExperimentalVMOptions -XX:+AlwaysPreTouch -XX:+UseStringDeduplication -XX:ParallelGCThreads=4 -XX:ConcGCThreads=2 -XX:+DisableExplicitGC"
|
||||
@ -15,19 +15,19 @@ RUN apt-get update && \
|
||||
apt-get install -y gosu libreoffice && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
# CONFIG
|
||||
COPY ./tomcat_conf/catalina.properties /usr/local/tomcat/conf/catalina.properties
|
||||
COPY ./tomcat_conf/context.xml /usr/local/tomcat/conf/context.xml
|
||||
COPY ./tomcat_conf/server.xml /usr/local/tomcat/conf/server.xml
|
||||
COPY ./conf/catalina.properties /usr/local/tomcat/conf/catalina.properties
|
||||
COPY ./conf/context.xml /usr/local/tomcat/conf/context.xml
|
||||
COPY ./conf/server.xml /usr/local/tomcat/conf/server.xml
|
||||
|
||||
# JDBC
|
||||
COPY ./libs/postgresql-42.6.0.jar /usr/local/tomcat/lib/postgresql-42.6.0.jar
|
||||
COPY ./libs/ /usr/local/tomcat/lib/
|
||||
|
||||
# Set permissions on Tomcat directories
|
||||
RUN chown -R ${USERNAME}:${GROUPNAME} /usr/local/tomcat
|
||||
|
||||
# Ensure the required dconf cache directory exists and has the correct permissions
|
||||
# Ensure the required dconf cache directory exists and has the correct permissions (per libreoffice)
|
||||
RUN mkdir -p /home/${USERNAME}/.cache/dconf && \
|
||||
chown -R ${USERNAME}:${GROUPNAME} /home/${USERNAME}/.cache/dconf
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user