Major
Detail
Major
Detail
Detail
#24788
Missing deployment of top-logic.js and CSS for production mode
There are currently 2 settings is-deployed in tl:JSFileCompiler and is-deployed in tl:ThemeFactory. These flags are used to control whether files are generated when the server is started.
With the setting is-deployed="true", the corresponding files must be generated during deployment. However, there is currently no tooling for this.
Improvement
During app deployment, styles and scripts are always generated and packed into the WAR. There is a new configuration fragment production-mode.xml that switches on the is-deployed mode when integrated into metaConf.txt. A newly created application has a deploy-aspect prod by default, with which the production-mode.xml configuration is integrated.
An application with settings as local but in production mode is built as follows:
mvn clean install -DdeployAspects=local,prod -Pwith-h2
Code migration
In an existing application, the deploy aspect prod must be created manually (if desired):
cp -ar deploy/local deploy/prod echo "production-mode.xml" > deploy/prod/WEB-INF/conf/metaConf.txt
Test
- Create new application.
- Build with the deploy aspects "local" and "prod".
- Deploy to web container.
- Login possible, ThemeFactory and JSFileCompiler run in "deployed" mode.
mvn -P tl archetype:generate -DarchetypeGroupId=com.top-logic -DarchetypeArtifactId=tl-archetype-app -DarchetypeVersion=7.5.0-SNAPSHOT cd my-app/ mvn clean install -DdeployAspects=local,prod -Pwith-h2 sudo cp target/my-app-1.0-SNAPSHOT-app.war /var/lib/tomcat9/webapps/