These procedures are intended for users with Docker knowledge. We do not provide Docker support, just provide guidelines on how to use it with our product. For more information about Docker, see https://docs.docker.com/

Web Application Platform provides a user-facing UI and an authentication entry point.

Downloading Web Application Platform software

To download the Web Application Platform software


  1. Download the Web_Application_Platform_<version>_war_files.zip file from https://software.3ds.com. See 3DS Media list.

    Starting with version 2026x Hot Fix 2, Web_Application_Platform_${version}_war_files.zip has been renamed to WebServiceWarFiles_${version}.zip.

  2. Copy Web_Application_Platform_<version>_files.zip to /twc on the server and copy all the files from WebAppPlatform using below command.
    cp -r CATIANoMagicServices/WebAppPlatform   webapp/WebAppPlatform
    SHELL
    Unzip Web_Application_Platform_<version>_war_files.zip, and copy all or required war files  to webapps folder
    cp -r *.war webapp/WebAppPlatform/webapps
    SHELL

Building Web Application Platform image

Please check the correct component version in the Third-Party Component Compatibility page and edit the Java version in the configuration files.

  1. Create the following files:
    1. webapp/Dockerfile


      # Use JDK 21 on UBI9-minimal for a modern, secure, and small base image
      FROM eclipse-temurin:21-jdk-ubi9-minimal
      
      # Install tools with microdnf and clean cache (available in ubi9-minimal)
      RUN microdnf install -y \
          sudo \
          wget \
          nc \
          net-tools\
          && microdnf clean all
      
      RUN mkdir -p /Certs
      
      ARG TOMCAT_DIR=/webapp
      ARG SET_ENV_FILE=${TOMCAT_DIR}/bin/setenv.sh
      
      # Copy scripts and web application platform
      COPY docker.scripts /scripts
      COPY WebAppPlatform /webapp
      
      # Set environment variables and permissions
      RUN echo 'export JAVA_OPTS="$JAVA_OPTS ${WEBAPP_PROPERTIES}"' >> ${SET_ENV_FILE} && \
          chmod o+x ${SET_ENV_FILE}
      
      WORKDIR /webapp
      EXPOSE 8443 8080
      CMD ["sh", "/scripts/run.sh"]
      SHELL
    2. webapp/docker-compose.yml

      version: '2.4'
      
      services:
        webapp:
          image: localhost/twc_webapp:latest
          container_name: webapp
          build:
            context: .
            dockerfile: Dockerfile
          ports:
            - "8080:8080"
            - "8443:8443"
      
          environment:
            ZOOKEEPER_HOST: zookeeper
            CASSANDRA_HOST: cassandra
            TWC_HOST: twcloud
            MESSAGING_EXTERNAL: "true"
            MESSAGING_HOST: messaging
            MESSAGING_PORT: "61616"
            MESSAGING_SECURITY_ENABLED: "true"
            MESSAGING_SECURITY_USERNAME: artemis
            MESSAGING_SECURITY_PASSWORD: artemis
      
            WEBAPP_PROPERTIES: >-
              -Dmessaging.server.security.enabled=true
              -Dmessaging.user.name=artemis
              -Dmessaging.user.password=artemis
      
          volumes:
            - ../data/certs:/webapp/certs
            - ../data/webapp/logs:/webapp/logs
      
          networks:
            - twc-net
      
          healthcheck:
            test: ["CMD", "nc", "-z", "-w2", "localhost", "8443"]
            interval: 10s
            timeout: 5s
            retries: 30
      
      networks:
        twc-net:
          external: true
      SHELL
    3. webapp/docker.scripts/run.sh 

      Change "CHANGE_TO_SERVER_FQDN" to your hostname.
      #!/bin/bash
      echo "ZOOKEEPER_HOST=${ZOOKEEPER_HOST}"
      echo "CASSANDRA_HOST=${CASSANDRA_HOST}"
      echo "TWC_HOST=${TWC_HOST}"
      echo "MESSAGING_EXTERNAL=${MESSAGING_EXTERNAL}"
      echo "MESSAGING_HOST=${MESSAGING_HOST}"
      echo "MESSAGING_PORT=${MESSAGING_PORT}"
      echo "REDIRECT_WHITELIST=${REDIRECT_WHITELIST}"
      echo "JAVA_HOME=${JAVA_HOME}"
      
      # debug
      pwd
      
      if [ -n "${REDIRECT_WHITELIST}" ]; then
        sed -i "s|^authentication.redirect.uri.whitelist=.*$|authentication.redirect.uri.whitelist=${REDIRECT_WHITELIST}|" shared/conf/authserver.properties
      fi
      if [ -n "${CASSANDRA_HOST}" ]; then
        sed -i "s|^cassandra.contactPoints=.*$|cassandra.contactPoints=${CASSANDRA_HOST}|" shared/conf/authserver.properties
      fi
      sed -i "s|^#authentication.client.ids=.*$|authentication.client.ids=MAGICDRAW,webApplicationPlatform,twcSynchronizationManager,twc-rest-api|" shared/conf/authserver.properties
      
      if [ -n "${TWC_HOST}" ]; then
        sed -i "s|^twc.ip=.*$|twc.ip=${TWC_HOST}|" shared/conf/webappplatform.properties
      fi
      if [ -n "${ZOOKEEPER_HOST}" ]; then
        sed -i "s|^zookeeper.server.ip=.*$|zookeeper.server.ip=${ZOOKEEPER_HOST}|" shared/conf/webappplatform.properties
      fi
      if [ -n "${MESSAGING_EXTERNAL}" ]; then
        if [ "${MESSAGING_EXTERNAL}" = true ]; then
          sed -i "s|^messaging.server.start=.*$|messaging.server.start=false|" shared/conf/webappplatform.properties
          sed -i "s|^messaging.server.ip=.*$|messaging.server.ip=${MESSAGING_HOST}|" shared/conf/webappplatform.properties
          sed -i "s|^messaging.server.port=.*$|messaging.server.port=${MESSAGING_PORT}|" shared/conf/webappplatform.properties
        else
          sed -i "s|^messaging.server.start=.*$|messaging.server.start=true|" shared/conf/webappplatform.properties
              sed -i "s|^messaging.server.ip=.*$|messaging.server.ip=127.0.0.1|" shared/conf/webappplatform.properties
        fi
      fi
      if [ -n "${MESSAGING_SECURITY_ENABLED}" ]; then
              if [ "${MESSAGING_SECURITY_ENABLED}" = true ]; then
                      sed -i "s|.*messaging.server.security.enabled=.*$|messaging.server.security.enabled=true|" shared/conf/webappplatform.properties
                      sed -i "s|.*messaging.user.name=.*$|messaging.user.name=${MESSAGING_SECURITY_USERNAME}|" shared/conf/webappplatform.properties
                      sed -i "s|.*messaging.user.password=.*$|messaging.user.password=${MESSAGING_SECURITY_PASSWORD}|" shared/conf/webappplatform.properties
      
              else
                      sed -i "s|.*messaging.server.security.enabled=.*$|messaging.server.security.enabled=false|" shared/conf/webappplatform.properties
              fi
      fi
      
      ln -sf /webapp/certs/webapp.p12 /Certs/keystore.p12
      
      # TODO need to pass external IP/HOSTNAME
      sed -i "s|^authentication.server.ip=.*$|authentication.server.ip=CHANGE_TO_SERVER_FQDN|" shared/conf/webappplatform.properties
      
      echo "" >> shared/conf/webappplatform.properties
      echo "ignore.wap.twc.compatibility=true" >> shared/conf/webappplatform.properties
      
      sed -i "s|^authentication.server.key-store=.*$|authentication.server.key-store=certs/webapp.p12|" shared/conf/authserver.properties
      sed -i "s|^authentication.server.key-alias=.*$|authentication.server.key-alias=webapp|" shared/conf/authserver.properties
      sed -i 's|certificateKeystoreFile="../TeamworkCloud/configuration/keystore.p12"|certificateKeystoreFile="certs/webapp.p12"|' conf/server.xml
      
      #debug
      mkdir -p logs/bak
      cp shared/conf/authserver.properties logs/bak/authserver.properties
      cp shared/conf/webappplatform.properties logs/bak/webappplatform.properties
      cp conf/server.xml logs/bak/server.xml
      echo -----------------------------------------------------------
      
      #bash ./bin/catalina.sh run >> logs/output.log 2>&1
      # In your run.sh
      exec bash ./bin/catalina.sh run 2>&1 | tee -a logs/output.log
      
      
      SHELL


  2. Build the image by running the following command:
    cd /webapp
    docker compose build --no-cache webapp
    SHELL
  3. Run a health check by executing the following command to check if Cassandra is operational:
    docker exec webapp nc -zv localhost 8443
    SHELL
  4. Verify status:
    docker ps -a
    SHELL

    All services should be in Up (healthy) state.