#installazione singolo tenant con apache incluso
services:
  tomcat:
    build:
      context: ./tomcat
      dockerfile: Dockerfile
      args:
        USER_ID: 1000
        GROUP_ID: 1000
        USERNAME: polo
        GROUPNAME: polo
    container_name: tomcat
    network_mode: host
    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
  apache:
    build:
        context: ./apache
        dockerfile: Dockerfile
    container_name: apache
    network_mode: host
    depends_on:
      - tomcat
    restart: always
