| id | developer-environment |
|---|---|
| title | Developer's Local Environment |
| description | Options for locally developing CMS Platform |
CMS Platform is meant to be fully developed offline. This allows developers to code, build, test, and run with the least friction when developing.
Developers can use VS Code with several included recommended extensions for a truly Open Source environment.
The following steps will guide you through the developer tools and environment setup so that your code changes can be compiled and copied automatically and then seen in your web browser.
- Install OpenJDK 21+
- Install Apache Ant 1.10+ and configure your terminal's path with ANT_HOME/bin
- Install Apache Tomcat 9.x into a directory of your choice
- Install the PostgreSQL database server – natively on MacOS with Postgres.app or with a Docker container like (postgis/postgis:18-3.6-alpine)
- Clone the CMS Platform repo –
git clone https://github.com/rajkowski/cms-platform.git - In the repo directory execute
ant deploy– this updates code and library changes in a working Tomcat exploded webapp directory./out/exploded/webapps/ROOT - Copy Tomcat's
confto./out/exploded/conf– this is where Tomcat will look for configuration information - Set environment variables for
CATALINA_BASEto the source code's working exploded directory,CMS_PATHto a new folder for the CMS user attachments, andDB_NAMEfor the PostgreSQL database; see example below... - Start Tomcat and the web application using Tomcat's run command:
bin/catalina.sh run
Minimal Environment Variables:
CATALINA_BASE=/path/to/cms-platform/out/exploded
CMS_PATH=/path/to/files/cms-platform
DB_NAME=cms-platform
CMS_ADMIN_USERNAME=user@example.com
CMS_ADMIN_PASSWORD=testIf not specified, the path for file assets and external configuration on Linux is /opt/cms-platform; otherwise $USER_HOME/Web/cms-platform
Use ant deploy to further update the web application with your changes. In debug mode, many Javascript, JSP, and XML files are automatically reloaded. If there are newly compiled Java files, libraries, or database migration scripts, then restart Tomcat.