From 64bced0ccc3141bc7c2a048613d35b1c231339ad Mon Sep 17 00:00:00 2001 From: jclausen Date: Wed, 20 Dec 2023 12:16:37 -0500 Subject: [PATCH] update to ContentBox 6 and use a single Dockerfile+matrix for builds --- .github/workflows/release.yml | 23 +- Dockerfile | 11 +- build/contentbox-setup.sh | 22 +- changelog.md | 5 + resources/app/Application.cfc | 136 ++---- resources/app/config/Application.cfm | 23 + resources/app/config/CacheBox.cfc | 2 +- resources/app/config/Coldbox.cfc | 432 +----------------- resources/app/config/Router.cfc | 29 +- resources/app/config/Scheduler.cfc | 84 ++++ resources/app/config/WireBox.cfc | 49 ++ resources/app/config/datasourceMixins.cfm | 48 +- resources/app/config/modules/cbdebugger.cfc | 102 +++++ resources/app/config/modules/cbfs.cfc | 34 ++ .../app/config/modules/cbmailservices.cfc | 32 ++ resources/app/config/modules/cborm.cfc | 32 ++ resources/app/config/modules/cbsecurity.cfc | 205 +++++++++ resources/app/config/modules/cbstorages.cfc | 44 ++ resources/app/config/modules/cbswagger.cfc | 133 ++++++ resources/app/config/modules/contentbox.cfc | 38 ++ resources/app/config/modules/htmlhelper.cfc | 19 + resources/app/config/modules/mementifier.cfc | 30 ++ resources/app/engines/server-adobe@2018.json | 6 + resources/app/engines/server-adobe@2021.json | 9 + resources/app/engines/server-adobe@2023.json | 9 + resources/app/engines/server-lucee@5.json | 6 + resources/app/server.json | 23 - variants/Adobe2016.Dockerfile | 13 - variants/Adobe2018.Dockerfile | 13 - variants/Adobe2021.Dockerfile | 15 - variants/Alpine.Dockerfile | 33 -- variants/Lucee5.Dockerfile | 13 - 32 files changed, 1012 insertions(+), 661 deletions(-) create mode 100755 resources/app/config/Application.cfm create mode 100644 resources/app/config/Scheduler.cfc create mode 100755 resources/app/config/WireBox.cfc create mode 100644 resources/app/config/modules/cbdebugger.cfc create mode 100644 resources/app/config/modules/cbfs.cfc create mode 100644 resources/app/config/modules/cbmailservices.cfc create mode 100644 resources/app/config/modules/cborm.cfc create mode 100644 resources/app/config/modules/cbsecurity.cfc create mode 100644 resources/app/config/modules/cbstorages.cfc create mode 100644 resources/app/config/modules/cbswagger.cfc create mode 100644 resources/app/config/modules/contentbox.cfc create mode 100644 resources/app/config/modules/htmlhelper.cfc create mode 100644 resources/app/config/modules/mementifier.cfc create mode 100644 resources/app/engines/server-adobe@2018.json create mode 100644 resources/app/engines/server-adobe@2021.json create mode 100644 resources/app/engines/server-adobe@2023.json create mode 100644 resources/app/engines/server-lucee@5.json delete mode 100644 resources/app/server.json delete mode 100644 variants/Adobe2016.Dockerfile delete mode 100644 variants/Adobe2018.Dockerfile delete mode 100644 variants/Adobe2021.Dockerfile delete mode 100644 variants/Alpine.Dockerfile delete mode 100644 variants/Lucee5.Dockerfile diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e2814ca..f27e6a6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,21 +14,26 @@ jobs: strategy: matrix: include: - - BUILD_IMAGE_DOCKERFILE : Dockerfile + - BASE_IMAGE: ortussolutions/commandbox BUILD_IMAGE_TAG: latest - - BUILD_IMAGE_DOCKERFILE : variants/Lucee5.Dockerfile + CFENGINE: lucee@5.4.4+38 + - BASE_IMAGE: ortussolutions/commandbox BUILD_IMAGE_TAG: lucee5 - - BUILD_IMAGE_DOCKERFILE : variants/Adobe2016.Dockerfile - BUILD_IMAGE_TAG: adobe2016 - - BUILD_IMAGE_DOCKERFILE : variants/Adobe2018.Dockerfile + CFENGINE: lucee@5.4.4+38 + - BASE_IMAGE: ortussolutions/commandbox:adobe2018 BUILD_IMAGE_TAG: adobe2018 - - BUILD_IMAGE_DOCKERFILE : variants/Adobe2021.Dockerfile + CFENGINE: adobe@2018 + - BASE_IMAGE: ortussolutions/commandbox:adobe2021 BUILD_IMAGE_TAG: adobe2021 - + CFENGINE: adobe@2021 + - BASE_IMAGE: ortussolutions/commandbox:adobe2023 + BUILD_IMAGE_TAG: adobe2023 + CFENGINE: adobe@2023 # Alpine builds # Note: No JDK builders currently support alpine with ARM - - BUILD_IMAGE_DOCKERFILE : variants/Alpine.Dockerfile + - BASE_IMAGE: ortussolutions/commandbox:alpine BUILD_IMAGE_TAG: alpine + CFENGINE: lucee@5.4.4+38 steps: - name: Checkout uses: actions/checkout@v2 @@ -47,7 +52,7 @@ jobs: env: DOCKER_IMAGE : ortussolutions/contentbox BUILD_IMAGE_TAG: ${{ matrix.BUILD_IMAGE_TAG }} - IMAGE_VERSION: 5.6.1 + IMAGE_VERSION: 6.0.1 run: | # Tag Builds if [[ $GITHUB_REF == refs/tags/* ]]; then diff --git a/Dockerfile b/Dockerfile index e6a1487..1498e68 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,7 @@ # Seed it on a specific CommandBox Image Version # https://hub.docker.com/r/ortussolutions/commandbox/tags -FROM ortussolutions/commandbox +ARG BASE_IMAGE=ortussolutions/commandbox +FROM ${BASE_IMAGE} # Labels LABEL version="@version@" @@ -9,8 +10,9 @@ LABEL maintainer "Luis Majano " LABEL repository "https://github.com/Ortus-Solutions/docker-contentbox" # Incoming Secrets/Vars From Build Process -ARG IMAGE_VERSION=5.6.0 +ARG IMAGE_VERSION=6.0.1 ARG TAGS=ortussolutions/contentbox:test +ARG CFENGINE=lucee@5.4.4+38 # Copy over our app resources which brings lots of goodness like session distribution, # db env vars, caching, etc. @@ -28,8 +30,11 @@ RUN ${BUILD_DIR}/contentbox/contentbox-setup.sh # ContentBox Run CMD ${BUILD_DIR}/contentbox/contentbox-run.sh +# WARM UP THE SERVER +RUN ${BUILD_DIR}/util/warmup-server.sh + # Healthcheck environment variables ENV HEALTHCHECK_URI "http://127.0.0.1:${PORT}/index.cfm" # Our healthcheck interval doesn't allow dynamic intervals - Default is 20s intervals with 15 retries -HEALTHCHECK --interval=30s --timeout=30s --retries=2 --start-period=60s CMD curl --fail ${HEALTHCHECK_URI} || exit 1 \ No newline at end of file +HEALTHCHECK --interval=30s --timeout=30s --retries=2 --start-period=60s CMD curl --fail ${HEALTHCHECK_URI} || exit 1 diff --git a/build/contentbox-setup.sh b/build/contentbox-setup.sh index 47dedcf..4dc0012 100755 --- a/build/contentbox-setup.sh +++ b/build/contentbox-setup.sh @@ -30,7 +30,27 @@ rm -f ${APP_DIR}/server.json # Copy over our resources echo ">INFO: Copying over ContentBox Container Overrides" -cp -rvf ${BUILD_DIR}/contentbox-app/* ${APP_DIR} +cp -rvf ${BUILD_DIR}/contentbox-app/config/* ${APP_DIR}/config/ +cp -vf ${BUILD_DIR}/contentbox-app/Application.cfc ${APP_DIR}/Application.cfc + +SERVER_FILE=${BUILD_DIR}/contentbox-app/engines/server-lucee@5.json + +case $CFENGINE in + + adobe@2018) + SERVER_FILE=${BUILD_DIR}/contentbox-app/engines/server-adobe@2018.json + ;; + + adobe@2021) + SERVER_FILE=${BUILD_DIR}/contentbox-app/engines/server-adobe@2021.json + ;; + + adobe@2023) + SERVER_FILE=${BUILD_DIR}/contentbox-app/engines/server-adobe@2023.json + ;; +esac + +cp -vf $SERVER_FILE ${APP_DIR}/server.json # Debug the App Dir #echo "Final App Dir" diff --git a/changelog.md b/changelog.md index 6882c5e..82fd98e 100644 --- a/changelog.md +++ b/changelog.md @@ -4,7 +4,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ---- +## [6.0.1] - Unreleased + ## [5.6.1] - Unreleased +### Changed +* Updated Lucee Engine to 5.3.9 +* Moved ACF2021 CFPM_INSTALL environment variable to before server warmup, to make sure extensions are seeded ## [5.6.0] - 2022-03-12 diff --git a/resources/app/Application.cfc b/resources/app/Application.cfc index be82dc2..161a625 100644 --- a/resources/app/Application.cfc +++ b/resources/app/Application.cfc @@ -6,17 +6,8 @@ * Application Bootstrap */ component { - /** - * -------------------------------------------------------------------------- - * NON COMMANDBOX INSTALLS - * -------------------------------------------------------------------------- - * If you are NOT using CommandBox as your server, then set the variable to true - * and ContentBox will load the `.env` environment file that is needed for operation. - * Without this, your NON CommandBox ContentBox install will fail. - */ - this._loadDynamicEnvironment = false; - request.$coldboxUtil = new coldbox.system.core.util.Util(); + request.$envHelper = new coldbox.system.core.delegates.Env(); /** * -------------------------------------------------------------------------- @@ -24,7 +15,7 @@ component { * -------------------------------------------------------------------------- */ // Application properties, modify as you see fit - this.name = "ContentBox-Docker-" & request.$coldboxUtil.getSystemSetting( "hostname", "" ); + this.name = "ContentBox-Docker-" & request.$envHelper.getSystemSetting( "hostname", "" ); this.sessionManagement = true; this.sessionTimeout = createTimespan( 0, 1, 0, 0 ); this.setClientCookies = true; @@ -39,7 +30,7 @@ component { * -------------------------------------------------------------------------- */ - // buffer the output of a tag/function body to output in case of a exception + // buffer the output of a tag/function body to output in case of a exception this.bufferOutput = true; // Activate Gzip Compression this.compression = false; @@ -54,18 +45,19 @@ component { * -------------------------------------------------------------------------- * Modify only if you need to, else default them. */ - COLDBOX_APP_ROOT_PATH = getDirectoryFromPath( getCurrentTemplatePath() ); - COLDBOX_APP_MAPPING = ""; - COLDBOX_CONFIG_FILE = ""; - COLDBOX_APP_KEY = ""; - COLDBOX_FAIL_FAST = true; + COLDBOX_APP_ROOT_PATH = getDirectoryFromPath( getCurrentTemplatePath() ); + COLDBOX_APP_MAPPING = ""; + COLDBOX_WEB_MAPPING = ""; + COLDBOX_CONFIG_FILE = ""; + COLDBOX_APP_KEY = ""; + COLDBOX_FAIL_FAST = true; /** * -------------------------------------------------------------------------- * Location Mappings * -------------------------------------------------------------------------- - * - cbApp : Quick reference to root application - * - coldbox : Where ColdBox library is installed + * - cbApp : Quick reference to this application root + * - coldbox : Where ColdBox is installed * - contentbox : Where the ContentBox module root is installed * - cborm : Where the cborm library is installed: Needed for ORM Event Handling. */ @@ -74,6 +66,11 @@ component { this.mappings[ "/contentbox" ] = COLDBOX_APP_ROOT_PATH & "modules/contentbox"; this.mappings[ "/cborm" ] = this.mappings[ "/contentbox" ] & "/modules/contentbox-deps/modules/cborm"; + /** + * Custom Datasource Dynamic configs before ORM definitions exist. + **/ + include "config/datasourceMixins.cfm"; + /** * -------------------------------------------------------------------------- * ORM + Datasource Settings @@ -83,18 +80,8 @@ component { * So Make sure you select one. */ - /** - * Custom Datasource Dynamic configs before ORM definitions exist. - **/ - include "config/datasourceMixins.cfm"; - - // Normal ContentBox ENV Loading - if( this._loadDynamicEnvironment ){ - loadEnv(); - } - // THE CONTENTBOX DATASOURCE NAME - this.datasource = request.$coldboxUtil.getSystemSetting( "DATASOURCE_NAME", "contentbox" ); + this.datasource = request.$envHelper.getSystemSetting( "DATASOURCE_NAME", "contentbox" ); // ORM SETTINGS this.ormEnabled = true; // cfformat-ignore-start @@ -106,16 +93,18 @@ component { // The ContentBox Core Entities "modules/contentbox/models", // Custom Module Entities - "modules_app" + "modules_app", + // Custom Module User Entities + "modules/contentbox/modules_user" ], // THE DIALECT OF YOUR DATABASE OR LET HIBERNATE FIGURE IT OUT, UP TO YOU TO CONFIGURE. - dialect : request.$coldboxUtil.getSystemSetting( "ORM_DIALECT", "" ), + dialect : request.$envHelper.getSystemSetting( "ORM_DIALECT", "" ), // DO NOT REMOVE THE FOLLOWING LINE OR AUTO-UPDATES MIGHT FAIL. dbcreate : "update", - secondarycacheenabled : request.$coldboxUtil.getSystemSetting( "ORM_SECONDARY_CACHE", false ), - cacheprovider : request.$coldboxUtil.getSystemSetting( "ORM_SECONDARY_CACHE", "ehCache" ), - logSQL : request.$coldboxUtil.getSystemSetting( "ORM_LOGSQL", false ), - sqlScript : request.$coldboxUtil.getSystemSetting( "ORM_SQL_SCRIPT", "" ), + secondarycacheenabled : request.$envHelper.getSystemSetting( "ORM_SECONDARY_CACHE", false ), + cacheprovider : request.$envHelper.getSystemSetting( "ORM_SECONDARY_CACHE", "ehCache" ), + logSQL : request.$envHelper.getSystemSetting( "ORM_LOGSQL", false ), + sqlScript : request.$envHelper.getSystemSetting( "ORM_SQL_SCRIPT", "" ), // ORM SESSION MANAGEMENT SETTINGS, DO NOT CHANGE flushAtRequestEnd : false, autoManageSession : false, @@ -131,44 +120,43 @@ component { /************************************** METHODS *********************************************/ - // application start - public boolean function onApplicationStart(){ - // Set a high timeout for any orm updates + boolean function onApplicationStart(){ setting requestTimeout ="300"; application.cbBootstrap= new coldbox.system.Bootstrap( COLDBOX_CONFIG_FILE, COLDBOX_APP_ROOT_PATH, COLDBOX_APP_KEY, - COLDBOX_APP_MAPPING + COLDBOX_APP_MAPPING, + COLDBOX_FAIL_FAST, + COLDBOX_WEB_MAPPING ); application.cbBootstrap.loadColdbox(); return true; } - // request start - public boolean function onRequestStart( string targetPage ){ + boolean function onRequestStart( string targetPage ){ // In case bootstrap or controller are missing, perform a manual restart if ( - !structKeyExists( application, "cbBootstrap" ) + isNull( application.cbBootstrap ) || - !structKeyExists( application, "cbController" ) + isNull( application.cbController ) ) { - if( this._loadDynamicEnvironment ){ - loadEnv( force : true ); + if ( this.cbLoadDynamicEnvironment ) { + loadEnv( force: true ); } reinitApplication(); } // Development Reinit + ORM Reloads if ( - structKeyExists( application, "cbController" ) + !isNull( application.cbController ) && application.cbController.getSetting( "environment" ) == "development" && application.cbBootstrap.isFWReinit() ) { - if( this._loadDynamicEnvironment ){ - loadEnv( force : true ); + if ( this.cbLoadDynamicEnvironment ) { + loadEnv( force: true ); } if ( structKeyExists( server, "lucee" ) ) { pagePoolClear(); @@ -182,59 +170,33 @@ component { return true; } - public void function onSessionStart(){ - if ( structKeyExists( application, "cbBootstrap" ) ) { + function onSessionStart(){ + if ( !isNull( application.cbBootstrap ) ) { application.cbBootStrap.onSessionStart(); } } - public void function onSessionEnd( struct sessionScope, struct appScope ){ + function onSessionEnd( struct sessionScope, struct appScope ){ arguments.appScope.cbBootStrap.onSessionEnd( argumentCollection = arguments ); } - public boolean function onMissingTemplate( template ){ + boolean function onMissingTemplate( template ){ return application.cbBootstrap.onMissingTemplate( argumentCollection = arguments ); } + function onApplicationEnd( struct appScope ){ + arguments.appScope.cbBootstrap.onApplicationEnd( arguments.appScope ); + } + + /*****************************************************************************************************/ + /************************************** APP HELPERS **************************************************/ + /*****************************************************************************************************/ + /** * Application Reinitialization **/ private void function reinitApplication(){ - // Run onAppStart onApplicationStart(); } - /** - * This method is only called if you are in a NON CommandBox install. - */ - private void function loadEnv( boolean force = false){ - var javaSystem = createObject( "java", "java.lang.System" ); - var value = javaSystem.getProperty( "contentbox_runtime_env" ); - // If not loaded, lock and load. - if ( isNull( value ) || arguments.force ) { - lock - name="contentbox_runtime_env" - timeout="15" - throwOnTimeout="true" - type="exclusive" - { - // Double lock - if( isNull( javaSystem.getProperty( "contentbox_runtime_env" ) ) || arguments.force ){ - // Load .env file - var props = createObject( "java", "java.util.Properties" ).init(); - props.load( - createObject( "java", "java.io.FileInputStream" ).init( expandPath( "/.env" ) ) - ); - // Iterate and add - var availableProps = props.propertyNames(); - while( availableProps.hasNext() ){ - var propName = availableProps.next(); - javaSystem.setProperty( propName, props.getProperty( propName ) ); - } - javaSystem.setProperty( "contentbox_runtime_env", true ); - } // end double lock - } // end lock - } // end lock check - } - } diff --git a/resources/app/config/Application.cfm b/resources/app/config/Application.cfm new file mode 100755 index 0000000..e3e4397 --- /dev/null +++ b/resources/app/config/Application.cfm @@ -0,0 +1,23 @@ + + \ No newline at end of file diff --git a/resources/app/config/CacheBox.cfc b/resources/app/config/CacheBox.cfc index f53ad0a..6251b6c 100644 --- a/resources/app/config/CacheBox.cfc +++ b/resources/app/config/CacheBox.cfc @@ -93,7 +93,7 @@ component { } }; - if( request.$coldboxUtil.getSystemSetting( "EXPRESS", false ) ){ + if( request.$envHelper.getSystemSetting( "EXPRESS", false ) ){ cacheBox.caches[ "express" ] = { objectDefaultTimeout = 120, //two hours default objectDefaultLastAccessTimeout = 30, //30 minutes idle time diff --git a/resources/app/config/Coldbox.cfc b/resources/app/config/Coldbox.cfc index cb71c9c..4c51a9b 100644 --- a/resources/app/config/Coldbox.cfc +++ b/resources/app/config/Coldbox.cfc @@ -85,13 +85,11 @@ component { */ logBox = { // Define Appenders - appenders : { - coldboxTracer : { class : "coldbox.system.logging.appenders.ConsoleAppender" } - }, + appenders : { coldboxTracer : { class : "coldbox.system.logging.appenders.ConsoleAppender" } }, // Root Logger - root : { levelmax : "INFO", appenders : "*" }, + root : { levelmax : "INFO", appenders : "*" }, // Implicit Level Categories - info : [ "coldbox.system", "contentbox" ] + info : [ "coldbox.system", "contentbox" ] }; /** @@ -131,9 +129,6 @@ component { autoSave : true // automatically save flash scopes at end of a request and on relocations. }; - // Choose a distributed cache - var distributedCache = getSystemSetting( "DISTRIBUTED_CACHE", getSystemSetting( "EXPRESS", false ) ? "express" : "jdbc" ); - /** * -------------------------------------------------------------------------- * Module Settings @@ -147,327 +142,14 @@ component { * * } */ - moduleSettings = { - - /** - * -------------------------------------------------------------------------- - * ContentBox Runtime Config - * -------------------------------------------------------------------------- - */ - contentbox : { - // Array of mixins (eg: /includes/contentHelpers.cfm) to inject into all content objects - "contentHelpers" = [], - // Setting Overrides - "settings" : { - // Global settings - "global" : { - // Distributed Cache For ContentBox - "cb_content_cacheName" = distributedCache == "express" ? "template" : distributedCache, - "cb_rss_cacheName" = distributedCache == "express" ? "template" : distributedCache, - "cb_site_settings_cache" = distributedCache - }, - // Site specific settings according to site slug - "sites" : { - // Default site - "default" = { - // Distributed Cache For ContentBox - "cb_content_cacheName" = distributedCache == "express" ? "template" : distributedCache, - "cb_rss_cacheName" = distributedCache == "express" ? "template" : distributedCache, - "cb_site_settings_cache" = distributedCache - } - } - } - }, - - /** - * -------------------------------------------------------------------------- - * ColdBox Storages - * -------------------------------------------------------------------------- - * ContentBox relies on the Cache Storage for tracking sessions, which delegates to a Cache provider - */ - cbStorages : { - // Cache Storage Settings - cacheStorage : { - // The CacheBox registered cache to store data in - cachename : "sessions", - // The default timeout of the session bucket, defaults to 60 minutes - timeout : getSystemSetting( "COLDBOX_SESSION_TIMEOUT", 60 ), - // The identifierProvider is a closure/udf that will return a unique identifier according to your rules - // If you do not provide one, then we will search in session, cookie and url for the ColdFusion identifier. - // identifierProvider : function(){} - identifierProvider : "" // If it's a simple value, we ignore it. - }, - // Cookie Storage settings - cookieStorage : { - // If browser does not support Secure Sockets Layer (SSL) security, the cookie is not sent. - // To use the cookie, the page must be accessed using the https protocol. - secure : false, - // If yes, sets cookie as httponly so that it cannot be accessed using JavaScripts - httpOnly : true, - // Domain in which cookie is valid and to which cookie content can be sent from the user's system. By default, the cookie - // is only available to the server that set it. Use this attribute to make the cookie available to other servers - domain : "", - // Use encryption of values - useEncryption : false, - // The unique seeding key to use: keep it secret, keep it safe - encryptionSeed : "", - // The algorithm to use: https://cfdocs.org/encrypt - encryptionAlgorithm : "BLOWFISH", - // The encryption encoding to use - encryptionEncoding : "HEX" - } - }, - - /** - * ColdBox cborm configurations https://forgebox.io/view/cborm - */ - cborm : { - injection : { - // enable entity injection via WireBox - enabled : true, - // Which entities to include in DI ONLY, if empty include all entities - include : "", - // Which entities to exclude from DI, if empty, none are excluded - exclude : "" - }, - resources : { - // Enable the ORM Resource Event Loader - eventLoader : true, - // Prefix to use on all the registered pre/post{Entity}{Action} events - eventPrefix : "cb_", - // Pagination max rows - maxRows : 25, - // Pagination max row limit: 0 = no limit - maxRowsLimit : 500 - } - }, - - /** - * Mementifier settings: https://forgebox.io/view/mementifier - */ - mementifier : { - // Turn on to use the ISO8601 date/time formatting on all processed date/time properites, else use the masks - iso8601Format = true, - // The default date mask to use for date properties - dateMask = "yyyy-MM-dd", - // The default time mask to use for date properties - timeMask = "HH:mm: ss", - // Enable orm auto default includes: If true and an object doesn't have any `memento` struct defined - // this module will create it with all properties and relationships it can find for the target entity - // leveraging the cborm module. - ormAutoIncludes = true, - // The default value for relationships/getters which return null - nullDefaultValue = '', - // Don't check for getters before invoking them - trustedGetters = false, - // If not empty, convert all date/times to the specific timezone - convertToTimezone = "UTC" - }, - - /** - * ColdBox Security Module Global Settings - */ - cbSecurity : { - // The global invalid authentication event or URI or URL to go if an invalid authentication occurs - "invalidAuthenticationEvent" : "", - // Default Auhtentication Action: override or redirect when a user has not logged in - "defaultAuthenticationAction" : "redirect", - // The global invalid authorization event or URI or URL to go if an invalid authorization occurs - "invalidAuthorizationEvent" : "", - // Default Authorization Action: override or redirect when a user does not have enough permissions to access something - "defaultAuthorizationAction" : "redirect", - // You can define your security rules here or externally via a source - // specify an array for inline, or a string (db|json|xml|model) for externally - "rules" : [], - // The validator is an object that will validate rules and annotations and provide feedback on either authentication or authorization issues. - "validator" : "SecurityValidator@contentbox", - // The WireBox ID of the authentication service to use in cbSecurity which must adhere to the cbsecurity.interfaces.IAuthService interface. - "authenticationService" : "SecurityService@contentbox", - // WireBox ID of the user service to use - "userService" : "AuthorService@contentbox", - // The name of the variable to use to store an authenticated user in prc scope if using a validator that supports it. - "prcUserVariable" : "oCurrentAuthor", - // Use regex in rules - "useRegex" : true, - // Use SSL: Determined by Request - "useSSL" : false, - // Enable annotation security as well - "handlerAnnotationSecurity" : true, - // JWT Settings - "jwt" : { - // The issuer authority for the tokens, placed in the `iss` claim - "issuer" : "contentbox", - // The jwt secret encoding key to use - "secretKey" : getSystemSetting( "JWT_SECRET", "" ), - // by default it uses the authorization bearer header, but you can also pass a custom one as well or as an rc variable. - "customAuthHeader" : "x-auth-token", - // The expiration in minutes for the jwt tokens - "expiration" : 60, - // If true, enables refresh tokens, longer lived tokens (not implemented yet) - "enableRefreshTokens" : true, - // The default expiration for refresh tokens, defaults to 7 days - "refreshExpiration" : 10080, - // The custom header to inspect for refresh tokens - "customRefreshHeader" : "x-refresh-token", - // If enabled, the JWT validator will inspect the request for refresh tokens and expired access tokens - // It will then automatically refresh them for you and return them back as - // response headers in the same request according to the `customRefreshHeader` and `customAuthHeader` - "enableAutoRefreshValidator" : true, - // Enable the POST > /cbsecurity/refreshtoken API endpoint - "enableRefreshEndpoint" : false, - // encryption algorithm to use, valid algorithms are: HS256, HS384, and HS512 - "algorithm" : "HS512", - // Which claims neds to be present on the jwt token or `TokenInvalidException` upon verification and decoding - "requiredClaims" : [], - // The token storage settings - "tokenStorage" : { - // enable or not, default is true - "enabled" : true, - // A cache key prefix to use when storing the tokens - "keyPrefix" : "cbjwt_", - // The driver to use: db, cachebox or a WireBox ID - "driver" : "db", - // Driver specific properties - "properties" : { - "table" : "cb_jwt", - "autoCreate" : true, - "rotationDays" : 7, - "rotationFrequency" : 60 - } - } - } // end jwt config - }, // end security config - - /** - * cbSwagger Documentation for Headless CMS - */ - cbSwagger : { - // The route prefix to search. Routes beginning with this prefix will be determined to be api routes - "routes" : [ "cbapi" ], - // Routes to exclude from the generated spec - "excludeRoutes" : [ "cbapi/v1/:anything/" ], - // The default output format, either json or yml - "defaultFormat" : "json", - // A convention route, relative to your app root, where request/response samples are stored ( e.g. resources/apidocs/responses/[module].[handler].[action].[HTTP Status Code].json ) - "samplesPath" : "resources/apidocs", - // Information about your API - // https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#infoObject - "info" : { - // REQUIRED A title for your API - "title" : "ContentBox CMS API", - // A short description of the application. CommonMark syntax MAY be used for rich text representation. - "description" : "The ContentBox Headless CMS API", - // A URL to the Terms of Service for the API. MUST be in the format of a URL. - "termsOfService" : "", - // Contact information for the exposed API. - "contact" : { - // The identifying name of the contact person/organization. - "name" : "Ortus Solutions", - // The URL pointing to the contact information. MUST be in the format of a URL. - "url" : "https://www.ortussolutions.com", - // The email address of the contact person/organization. MUST be in the format of an email address. - "email" : "info@ortussolutions.com" - }, - // License information for the exposed API. - "license" : { - // The license name used for the API. - "name" : "Apache2", - // A URL to the license used for the API. MUST be in the format of a URL. - "url" : "https://www.apache.org/licenses/LICENSE-2.0.html" - }, - // REQUIRED. The version of the OpenAPI document (which is distinct from the OpenAPI Specification version or the API implementation version). - "version" : "5.0.3" - }, - // An array of Server Objects, which provide connectivity information to a target server. If the servers property is not provided, or is an empty array, the default value would be a Server Object with a url value of /. - // https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#serverObject - "servers" : [ - { - "url" : "http://127.0.0.1:8589", - "description" : "Development Server" - } - ], - // An element to hold various schemas for the specification. - // https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#componentsObject - "components" : { - // Define your security schemes here - // https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#securitySchemeObject - "securitySchemes" : { - "ApiKeyAuth" : { - "type" : "apiKey", - "description" : "User your JWT as an Api Key for security", - "name" : "x-auth-token", - "in" : "header" - }, - "ApiKeyQueryAuth" : { - "type" : "apiKey", - "description" : "User your JWT as an Api Key for security", - "name" : "x-auth-token", - "in" : "query" - }, - "BearerAuth" : { - "type" : "http", - "description" : "User your JWT in the bearer Authorization header", - "scheme" : "bearer", - "bearerFormat" : "JWT" - } - } - }, - // A declaration of which security mechanisms can be used across the API. - // https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#securityRequirementObject - "security" : [ - { "ApiKeyAuth" : [] }, - { "ApiKeyQueryAuth" : [] }, - { "BearerAuth" : [] } - ], - // A list of tags used by the specification with additional metadata. - // https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#tagObject - "tags" : [ - { "name" : "Authors", "description" : "Author operations" }, - { "name" : "Authentication", "description" : "Authentication operations" }, - { "name" : "Categories", "description" : "Category operations" }, - { "name" : "Comments", "description" : "Comment operations" }, - { "name" : "ContentStore", "description" : "Content store operations" }, - { "name" : "Entries", "description" : "Blog entry operations" }, - { "name" : "Menus", "description" : "Menu operations" }, - { "name" : "Pages", "description" : "Pages operations" }, - { "name" : "Sites", "description" : "Site operations" }, - { "name" : "Settings", "description" : "Global setting operations" }, - { "name" : "Versions", "description" : "Content versions operations" } - ], - // Additional external documentation. - // https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#externalDocumentationObject - "externalDocs" : { "description" : "Find more info here", "url" : "https://contentbox.ortusbooks.com" } - } - }; - - // Distributed Cache Flash, only in non installer mode - if( !getSystemSetting( "installer", false ) && !getSystemSetting( "install", false ) ){ - flash = { - scope = "cache", - properties = { - cacheName = distributedCache - }, - inflateToRC = true, - inflateToPRC = false, - autoPurge = true, - autoSave = true - }; - } + moduleSettings = {}; + } - // Mail settings for writing to log files instead of sending mail on dev. - if( getSystemSetting( "ORTUS_DEV", false ) ){ - mailSettings = { - from = "info@ortussolutions.com", - to = "info@ortussolutions.com", - type = "HTML", - protocol = { - class = "cbmailservices.models.protocols.FileProtocol", - properties = { - filePath = "logs" - } - } - }; - } + /** + * Testing Mode. + */ + function testing(){ + development(); } /** @@ -482,101 +164,15 @@ component { // No Singletons for easy testing wirebox = { - //singletonReload : true + // singletonReload : true }; // debugging file logbox.appenders.files = { class : "coldbox.system.logging.appenders.RollingFileAppender", - properties : { filename : "contentbox", filePath : "/cbapp/config/logs/app" } - }; - - // Mail settings for writing to log files instead of sending mail on dev. - mailsettings.protocol = { - class : "cbmailservices.models.protocols.FileProtocol", - properties : { filePath : "/cbapp/config/logs/mail" } - }; - - // Debugger Settings - variables.modulesettings.cbdebugger = { - // This flag enables/disables the tracking of request data to our storage facilities - // To disable all tracking, turn this master key off - enabled : getSystemSetting( "CBDEBUGGER_ENABLED", false ), - // This setting controls if you will activate the debugger for visualizations ONLY - // The debugger will still track requests even in non debug mode. - debugMode : true, - // The URL password to use to activate it on demand - debugPassword : "cb", - // Request Tracker Options - requestTracker : { - storage : "cachebox", - cacheName : "template", - trackDebuggerEvents : false, - // Expand by default the tracker panel or not - expanded : false, - // Slow request threshold in milliseconds, if execution time is above it, we mark those transactions as red - slowExecutionThreshold : 1000, - // How many tracking profilers to keep in stack: Default is to monitor the last 20 requests - maxProfilers : 50, - // If enabled, the debugger will monitor the creation time of CFC objects via WireBox - profileWireBoxObjectCreation : false, - // Profile model objects annotated with the `profile` annotation - profileObjects : true, - // If enabled, will trace the results of any methods that are being profiled - traceObjectResults : false, - // Profile Custom or Core interception points - profileInterceptions : false, - // By default all interception events are excluded, you must include what you want to profile - includedInterceptions : [], - // Control the execution timers - executionTimers : { - expanded : true, - // Slow transaction timers in milliseconds, if execution time of the timer is above it, we mark it - slowTimerThreshold : 250 - }, - // Control the coldbox info reporting - coldboxInfo : { expanded : false }, - // Control the http request reporting - httpRequest : { - expanded : false, - // If enabled, we will profile HTTP Body content, disabled by default as it contains lots of data - profileHTTPBody : false - } - }, - // ColdBox Tracer Appender Messages - tracers : { enabled : true, expanded : false }, - // Request Collections Reporting - collections : { - // Enable tracking - enabled : false, - // Expanded panel or not - expanded : false, - // How many rows to dump for object collections - maxQueryRows : 50, - // How many levels to output on dumps for objects - maxDumpTop : 5 - }, - // CacheBox Reporting - cachebox : { enabled : true, expanded : false }, - // Modules Reporting - modules : { enabled : true, expanded : false }, - // Quick and QB Reporting - qb : { - enabled : false, - expanded : false, - // Log the binding parameters - logParams : true - }, - // cborm Reporting - cborm : { - enabled : true, - expanded : false, - // Log the binding parameters - logParams : false - }, - async : { - enabled : true, - expanded : false + properties : { + filename : "contentbox", + filePath : "/cbapp/config/logs/app" } }; diff --git a/resources/app/config/Router.cfc b/resources/app/config/Router.cfc index ec71307..1345782 100644 --- a/resources/app/config/Router.cfc +++ b/resources/app/config/Router.cfc @@ -1,17 +1,28 @@ /** -* ContentBox - A Modular Content Platform -* Copyright since 2012 by Ortus Solutions, Corp -* www.ortussolutions.com/products/contentbox -* --- -* Application Router -*/ -component{ + * ContentBox - A Modular Content Platform + * Copyright since 2012 by Ortus Solutions, Corp + * www.ortussolutions.com/products/contentbox + * --- + * Application Router + */ +component { function configure(){ // Configuration - setValidExtensions( 'xml,json,jsont,rss,html,htm,cfm,print,pdf,doc,txt' ); + setValidExtensions( "xml,json,jsont,rss,html,htm,cfm,print,pdf,doc,txt" ); // Process Full Rewrites then true, else false and an `index.cfm` will always be included in URLs - setFullRewrites( true ); + setFullRewrites( false ); + + /** + * -------------------------------------------------------------------------- + * App Routes + * -------------------------------------------------------------------------- + * + * Here is where you can register the routes for your web application! + * Go get Funky! + * + */ + // Mappings route( ":handler/:action" ).end(); } diff --git a/resources/app/config/Scheduler.cfc b/resources/app/config/Scheduler.cfc new file mode 100644 index 0000000..edeea67 --- /dev/null +++ b/resources/app/config/Scheduler.cfc @@ -0,0 +1,84 @@ +component { + + /** + * Configure the ColdBox Scheduler + */ + function configure(){ + /** + * -------------------------------------------------------------------------- + * Configuration Methods + * -------------------------------------------------------------------------- + * From here you can set global configurations for the scheduler + * - setTimezone( ) : change the timezone for ALL tasks + * - setExecutor( executorObject ) : change the executor if needed + */ + + + + /** + * -------------------------------------------------------------------------- + * Register Scheduled Tasks + * -------------------------------------------------------------------------- + * You register tasks with the task() method and get back a ColdBoxScheduledTask object + * that you can use to register your tasks configurations. + */ + } + + /** + * Called before the scheduler is going to be shutdown + */ + function onShutdown(){ + } + + /** + * Called after the scheduler has registered all schedules + */ + function onStartup(){ + log.info( "√ ColdBox Core Scheduler started successfully!" ); + } + + /** + * Called whenever ANY task fails + * + * @task The task that got executed + * @exception The ColdFusion exception object + */ + function onAnyTaskError( required task, required exception ){ + log.error( + "The global task (#arguments.task.getname()#) failed to executed. Caused by: #exception.message & exception.detail#", + exception.stacktrace + ); + } + + /** + * Called whenever ANY task succeeds + * + * @task The task that got executed + * @result The result (if any) that the task produced + */ + function onAnyTaskSuccess( required task, result ){ + log.info( + "Global task (#arguments.task.getName()#) completed succesfully in #arguments.task.getStats().lastExecutionTime# ms", + arguments.task.getStats() + ); + } + + /** + * Called before ANY task runs + * + * @task The task about to be executed + */ + function beforeAnyTask( required task ){ + log.info( "Starting to execute global task (#arguments.task.getName()#)..." ); + } + + /** + * Called after ANY task runs + * + * @task The task that got executed + * @result The result (if any) that the task produced + */ + function afterAnyTask( required task, result ){ + } + +} diff --git a/resources/app/config/WireBox.cfc b/resources/app/config/WireBox.cfc new file mode 100755 index 0000000..e8b80d7 --- /dev/null +++ b/resources/app/config/WireBox.cfc @@ -0,0 +1,49 @@ +/** + * ContentBox - A Modular Content Platform + * Copyright since 2012 by Ortus Solutions, Corp + * www.ortussolutions.com/products/contentbox + * --- + * WireBox Configuration + */ +component extends="coldbox.system.ioc.config.Binder" { + + /** + * Configure WireBox, that's it! + */ + function configure(){ + /** + * -------------------------------------------------------------------------- + * WireBox Configuration (https://wirebox.ortusbooks.com) + * -------------------------------------------------------------------------- + * Configure WireBox + */ + wireBox = { + // Scope registration, automatically register a wirebox injector instance on any CF scope + // By default it registeres itself on application scope + scopeRegistration : { + enabled : true, + scope : "application", // server, cluster, session, application + key : "wireBox" + }, + // DSL Namespace registrations + customDSL : { + // namespace = "mapping name" + }, + // Custom Storage Scopes + customScopes : { + // annotationName = "mapping name" + }, + // Package scan locations + scanLocations : [], + // Stop Recursions + stopRecursions : [], + // Parent Injector to assign to the configured injector, this must be an object reference + parentInjector : "", + // Register all event listeners here, they are created in the specified order + listeners : [ { class : "coldbox.system.aop.Mixer" } ] + }; + + // Map Bindings below + } + +} diff --git a/resources/app/config/datasourceMixins.cfm b/resources/app/config/datasourceMixins.cfm index bfd23cf..994eb5c 100644 --- a/resources/app/config/datasourceMixins.cfm +++ b/resources/app/config/datasourceMixins.cfm @@ -1,12 +1,12 @@ - isExpress = request.$coldboxUtil.getSystemSetting( "EXPRESS", false ); + isExpress = request.$envHelper.getSystemSetting( "EXPRESS", false ); // Express H2SQL Database if( isExpress ){ - dbDirectory = request.$coldboxUtil.getSystemSetting( "H2_DIR", '/data/contentbox/db' ); - + dbDirectory = request.$envHelper.getSystemSetting( "H2_DIR", '/data/contentbox/db' ); + datasourceConfig = { class : 'org.h2.Driver', connectionString : 'jdbc:h2:' & dbDirectory & '/contentbox;MODE=MySQL', @@ -14,17 +14,19 @@ clob : true, blob : true }; - } + + this.ormSettings[ "dialect" ] = "MySQL"; + } // Else traditional RDBMS else { //ACF Syntax Datasources - if( len( request.$coldboxUtil.getSystemSetting( "DB_DRIVER" ) ) ){ + if( len( request.$envHelper.getSystemSetting( "DB_DRIVER" ) ) ){ dbExpectedKeys = [ 'DB_HOST', 'DB_PORT','DB_NAME', 'DB_USER', 'DB_PORT' ]; for( configExpectedKey in dbExpectedKeys ){ - if( !len( request.$coldboxUtil.getSystemSetting( configExpectedKey, "" ) ) ){ - throw( + if( !len( request.$envHelper.getSystemSetting( configExpectedKey, "" ) ) ){ + throw( type="ContentBox.Docker.DatasourceExpectationException", message="The system detected a custom `DB_DRIVER` configuration in the environment, but not all of the expected configuration key #configExpectedKey# was not present." ); @@ -32,30 +34,30 @@ } datasourceConfig = { - driver : request.$coldboxUtil.getSystemSetting( "DB_DRIVER" ), - host : request.$coldboxUtil.getSystemSetting( "DB_HOST" ), - port : request.$coldboxUtil.getSystemSetting( "DB_PORT" ), - database : request.$coldboxUtil.getSystemSetting( "DB_NAME" ), - username : request.$coldboxUtil.getSystemSetting( "DB_USER" ), + driver : request.$envHelper.getSystemSetting( "DB_DRIVER" ), + host : request.$envHelper.getSystemSetting( "DB_HOST" ), + port : request.$envHelper.getSystemSetting( "DB_PORT" ), + database : request.$envHelper.getSystemSetting( "DB_NAME" ), + username : request.$envHelper.getSystemSetting( "DB_USER" ), storage : true, clob : true, blob : true }; - if( len( request.$coldboxUtil.getSystemSetting( "DB_PASSWORD", "" ) ) ){ - datasourceConfig[ "password" ] = request.$coldboxUtil.getSystemSetting( "DB_PASSWORD" ); + if( len( request.$envHelper.getSystemSetting( "DB_PASSWORD", "" ) ) ){ + datasourceConfig[ "password" ] = request.$envHelper.getSystemSetting( "DB_PASSWORD" ); } - } else if( len( request.$coldboxUtil.getSystemSetting( "DB_CONNECTION_STRING", "" ) ) ){ + } else if( len( request.$envHelper.getSystemSetting( "DB_CONNECTION_STRING", "" ) ) ){ dbExpectedKeys = [ 'DB_CLASS', 'DB_USER' ]; for( configExpectedKey in dbExpectedKeys ){ - if( !len( request.$coldboxUtil.getSystemSetting( configExpectedKey, "" ) ) ){ - throw( + if( !len( request.$envHelper.getSystemSetting( configExpectedKey, "" ) ) ){ + throw( type="ContentBox.Docker.DatasourceExpectationException", message="The system detected a custom `DB_CONNECTION_STRING` configuration in the environment, but not all of the expected configuration key #configExpectedKey# was not present." ); @@ -63,16 +65,16 @@ } datasourceConfig = { - class : request.$coldboxUtil.getSystemSetting( "DB_CLASS" ), - connectionString: request.$coldboxUtil.getSystemSetting( "DB_CONNECTION_STRING" ), - username : request.$coldboxUtil.getSystemSetting( "DB_USER" ), + class : request.$envHelper.getSystemSetting( "DB_CLASS" ), + connectionString: request.$envHelper.getSystemSetting( "DB_CONNECTION_STRING" ), + username : request.$envHelper.getSystemSetting( "DB_USER" ), storage : true, clob : true, blob : true }; - if( len( request.$coldboxUtil.getSystemSetting( "DB_PASSWORD", "" ) ) ){ - datasourceConfig[ "password" ] = request.$coldboxUtil.getSystemSetting( "DB_PASSWORD" ); + if( len( request.$envHelper.getSystemSetting( "DB_PASSWORD", "" ) ) ){ + datasourceConfig[ "password" ] = request.$envHelper.getSystemSetting( "DB_PASSWORD" ); } if( findNoCase( "sqlserver", datasourceConfig.class ) ){ @@ -85,6 +87,6 @@ // If a datasource configuration is defined, assign it. Otherwise we'll assume it's been handled in another way if( !isNull( datasourceConfig ) ){ - this.datasources[ request.$coldboxUtil.getSystemSetting( "DATASOURCE_NAME", "contentbox" ) ] = datasourceConfig; + this.datasources[ request.$envHelper.getSystemSetting( "DATASOURCE_NAME", "contentbox" ) ] = datasourceConfig; } \ No newline at end of file diff --git a/resources/app/config/modules/cbdebugger.cfc b/resources/app/config/modules/cbdebugger.cfc new file mode 100644 index 0000000..78bd813 --- /dev/null +++ b/resources/app/config/modules/cbdebugger.cfc @@ -0,0 +1,102 @@ +component { + + function configure(){ + return { + // This flag enables/disables the tracking of request data to our storage facilities + // To disable all tracking, turn this master key off + enabled : getSystemSetting( "CBDEBUGGER_ENABLED", false ), + // This setting controls if you will activate the debugger for visualizations ONLY + // The debugger will still track requests even in non debug mode. + debugMode : true, + // The URL password to use to activate it on demand + debugPassword : "cb", + // This flag enables/disables the end of request debugger panel docked to the bottem of the page. + // If you disable i, then the only way to visualize the debugger is via the `/cbdebugger` endpoint + requestPanelDock : true, + // Request Tracker Options + requestTracker : { + storage : "memory", + cacheName : "template", + trackDebuggerEvents : false, + // Expand by default the tracker panel or not + expanded : true, + // Slow request threshold in milliseconds, if execution time is above it, we mark those transactions as red + slowExecutionThreshold : 1000, + // How many tracking profilers to keep in stack: Default is to monitor the last 20 requests + maxProfilers : 50, + // If enabled, the debugger will monitor the creation time of CFC objects via WireBox + profileWireBoxObjectCreation : false, + // Profile model objects annotated with the `profile` annotation + profileObjects : false, + // If enabled, will trace the results of any methods that are being profiled + traceObjectResults : false, + // Profile Custom or Core interception points + profileInterceptions : false, + // By default all interception events are excluded, you must include what you want to profile + includedInterceptions : [], + // Control the execution timers + executionTimers : { + expanded : true, + // Slow transaction timers in milliseconds, if execution time of the timer is above it, we mark it + slowTimerThreshold : 250 + }, + // Control the coldbox info reporting + coldboxInfo : { expanded : true }, + // Control the http request reporting + httpRequest : { + expanded : false, + // If enabled, we will profile HTTP Body content, disabled by default as it contains lots of data + profileHTTPBody : true + } + }, + // ColdBox Tracer Appender Messages + tracers : { enabled : false, expanded : false }, + // Request Collections Reporting + collections : { + // Enable tracking + enabled : false, + // Expanded panel or not + expanded : false, + // How many rows to dump for object collections + maxQueryRows : 50, + // How many levels to output on dumps for objects + maxDumpTop : 5 + }, + // CacheBox Reporting + cachebox : { enabled : false, expanded : false }, + // Modules Reporting + modules : { enabled : true, expanded : false }, + // Quick and QB Reporting + qb : { + enabled : false, + expanded : false, + // Log the binding parameters + logParams : true + }, + // cborm Reporting + cborm : { + enabled : true, + expanded : false, + // Log the binding parameters + logParams : false + }, + // Adobe ColdFusion SQL Collector + acfSql : { enabled : false, expanded : false, logParams : true }, + // Lucee SQL Collector + luceeSQL : { enabled : false, expanded : false, logParams : true }, + // Async Manager Collector + async : { enabled : true, expanded : false }, + // Hyper Collector + hyper : { + enabled : false, + expanded : false, + logResponseData : false, + logRequestBody : false + } + }; + } + + function development( settings ){ + } + +} diff --git a/resources/app/config/modules/cbfs.cfc b/resources/app/config/modules/cbfs.cfc new file mode 100644 index 0000000..60e371e --- /dev/null +++ b/resources/app/config/modules/cbfs.cfc @@ -0,0 +1,34 @@ +component { + + function configure(){ + /** + * -------------------------------------------------------------------------- + * CBFS Module Settings + * -------------------------------------------------------------------------- + * configurations https://cbfs.ortusbooks.com/getting-started/configuration + */ + return { + // The default disk + "defaultDisk" : "contentbox", + // Register the disks on the system + "disks" : { + // Your default application storage + "contentbox" : { + provider : "Local", + properties : { + path : "#controller.getAppRootPath()#modules_app/contentbox-custom/_content", + diskUrl : function(){ + return application.wirebox + .getInstance( "CBHelper@contentBox" ) + .site() + .getSiteRoot() + & + "/modules_app/contentbox-custom/_content/" + } + } + } + } + }; + } + +} diff --git a/resources/app/config/modules/cbmailservices.cfc b/resources/app/config/modules/cbmailservices.cfc new file mode 100644 index 0000000..9826480 --- /dev/null +++ b/resources/app/config/modules/cbmailservices.cfc @@ -0,0 +1,32 @@ +component { + + function configure(){ + /** + * -------------------------------------------------------------------------- + * ColdBox MailServices + * -------------------------------------------------------------------------- + * configurations https://coldbox-mailservices.ortusbooks.com/essentials/configuration + */ + return { + // The default token Marker Symbol + tokenMarker : "@", + // Default protocol to use, it must be defined in the mailers configuration + defaultProtocol : "files", + // Here you can register one or many mailers by name + mailers : { + "default" : { class : "CFMail" }, + "files" : { + class : "File", + properties : { filePath : "config/logs/mail" } + } + }, + // The defaults for all mail config payloads and protocols + defaults : { + // from : "", + }, + // Whether the scheduled task is running or not + runQueueTask : true + }; + } + +} diff --git a/resources/app/config/modules/cborm.cfc b/resources/app/config/modules/cborm.cfc new file mode 100644 index 0000000..aeb97c0 --- /dev/null +++ b/resources/app/config/modules/cborm.cfc @@ -0,0 +1,32 @@ +component { + + function configure(){ + /** + * -------------------------------------------------------------------------- + * ColdBox ORM + * -------------------------------------------------------------------------- + * ColdBox cborm configurations https://forgebox.io/view/cborm + */ + return { + injection : { + // enable entity injection via WireBox + enabled : true, + // Which entities to include in DI ONLY, if empty include all entities + include : "", + // Which entities to exclude from DI, if empty, none are excluded + exclude : "" + }, + resources : { + // Enable the ORM Resource Event Loader + eventLoader : true, + // Prefix to use on all the registered pre/post{Entity}{Action} events + eventPrefix : "cb_", + // Pagination max rows + maxRows : 25, + // Pagination max row limit: 0 = no limit + maxRowsLimit : 500 + } + }; + } + +} diff --git a/resources/app/config/modules/cbsecurity.cfc b/resources/app/config/modules/cbsecurity.cfc new file mode 100644 index 0000000..65c7cf6 --- /dev/null +++ b/resources/app/config/modules/cbsecurity.cfc @@ -0,0 +1,205 @@ +component { + + function configure(){ + /** + * -------------------------------------------------------------------------- + * ColdBox Security Configuration + * -------------------------------------------------------------------------- + * https://coldbox-security.ortusbooks.com/getting-started/configuration/ + */ + return { + /** + * -------------------------------------------------------------------------- + * Authentication Services + * -------------------------------------------------------------------------- + * Here you will configure which service is in charge of providing authentication for your application. + * By default we leverage the cbauth module which expects you to connect it to a database via your own User Service. + * + * Available authentication providers: + * - cbauth : Leverages your own UserService that determines authentication and user retrieval + * - basicAuth : Leverages basic authentication and basic in-memory user registration in our configuration + * - custom : Any other service that adheres to our IAuthService interface + */ + authentication : { + // The WireBox ID of the authentication service to use which must adhere to the cbsecurity.interfaces.IAuthService interface. + "provider" : "SecurityService@contentbox", + // WireBox ID of the user service to use when leveraging user authentication, we default this to whatever is set + // by cbauth or basic authentication. (Optional) + "userService" : "AuthorService@contentbox", + // The name of the variable to use to store an authenticated user in prc scope on all incoming authenticated requests + "prcUserVariable" : "oCurrentAuthor" + }, + firewall : { + // Enable annotation security as well + "handlerAnnotationSecurity" : true, + // The global invalid authentication event or URI or URL to go if an invalid authentication occurs + "invalidAuthenticationEvent" : "", + // Default Auhtentication Action: override or redirect when a user has not logged in + "defaultAuthenticationAction" : "redirect", + // The global invalid authorization event or URI or URL to go if an invalid authorization occurs + "invalidAuthorizationEvent" : "", + // Default Authorization Action: override or redirect when a user does not have enough permissions to access something + "defaultAuthorizationAction" : "redirect", + // You can define your security rules here or externally via a source + // specify an array for inline, or a string (db|json|xml|model) for externally + "rules" : { + // Use regex in rules + "useRegex" : true, + // Use SSL: Determined by Request + "useSSL" : false, + // A collection of default name-value pairs to add to ALL rules + // This way you can add global roles, permissions, redirects, etc + "defaults" : {}, + // You can store all your rules in this inline array + "inline" : [] + }, + // The validator is an object that will validate rules and annotations and provide feedback on either authentication or authorization issues. + "validator" : "SecurityValidator@contentbox", + // Firewall database event logs. + "logs" : { + "enabled" : true, + "table" : "cbsecurity_logs", + "autoCreate" : true + } + }, + /** + * -------------------------------------------------------------------------- + * CSRF - Cross Site Request Forgery Settings + * -------------------------------------------------------------------------- + * These settings configures the cbcsrf module. Look at the module configuration for more information + */ + csrf : { + // By default we load up an interceptor that verifies all non-GET incoming requests against the token validations + enableAutoVerifier : false, + // A list of events to exclude from csrf verification, regex allowed: e.g. stripe\..* + verifyExcludes : [], + // By default, all csrf tokens have a life-span of 30 minutes. After 30 minutes, they expire and we aut-generate new ones. + // If you do not want expiring tokens, then set this value to 0 + rotationTimeout : 30, + // Enable the /cbcsrf/generate endpoint to generate cbcsrf tokens for secured users. + enableEndpoint : false, + // The WireBox mapping to use for the CacheStorage + cacheStorage : "CacheStorage@cbstorages", + // Enable/Disable the cbAuth login/logout listener in order to rotate keys + enableAuthTokenRotator : true + }, + /** + * -------------------------------------------------------------------------- + * Security Headers + * -------------------------------------------------------------------------- + * This section is the way to configure cbsecurity for header detection, inspection and setting for common + * security exploits like XSS, ClickJacking, Host Spoofing, IP Spoofing, Non SSL usage, HSTS and much more. + */ + securityHeaders : { + // If you trust the upstream then we will check the upstream first for specific headers + "trustUpstream" : true, + // Content Security Policy + // Content Security Policy (CSP) is an added layer of security that helps to detect and mitigate certain types of attacks, + // including Cross-Site Scripting (XSS) and data injection attacks. These attacks are used for everything from data theft, to + // site defacement, to malware distribution. + // https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP + "contentSecurityPolicy" : { + // Disabled by defautl as it is totally customizable + "enabled" : false, + // The custom policy to use, by default we don't include any + "policy" : "" + }, + // The X-Content-Type-Options response HTTP header is a marker used by the server to indicate that the MIME types advertised in + // the Content-Type headers should be followed and not be changed => X-Content-Type-Options: nosniff + // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options + "contentTypeOptions" : { "enabled" : true }, + "customHeaders" : { + // Name : value pairs as you see fit. + }, + // Disable Click jacking: X-Frame-Options: DENY OR SAMEORIGIN + // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options + "frameOptions" : { "enabled" : true, "value" : "SAMEORIGIN" }, + // HTTP Strict Transport Security (HSTS) + // The HTTP Strict-Transport-Security response header (often abbreviated as HSTS) + // informs browsers that the site should only be accessed using HTTPS, and that any future attempts to access it + // using HTTP should automatically be converted to HTTPS. + // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security, + "hsts" : { + "enabled" : false, + // The time, in seconds, that the browser should remember that a site is only to be accessed using HTTPS, 1 year is the default + "max-age" : "31536000", + // See Preloading Strict Transport Security for details. Not part of the specification. + "preload" : false, + // If this optional parameter is specified, this rule applies to all of the site's subdomains as well. + "includeSubDomains" : false + }, + // Validates the host or x-forwarded-host to an allowed list of valid hosts + "hostHeaderValidation" : { + "enabled" : false, + // Allowed hosts list + "allowedHosts" : "" + }, + // Validates the ip address of the incoming request + "ipValidation" : { + "enabled" : false, + // Allowed IP list + "allowedIPs" : "" + }, + // The Referrer-Policy HTTP header controls how much referrer information (sent with the Referer header) should be included with requests. + // Aside from the HTTP header, you can set this policy in HTML. + // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy + "referrerPolicy" : { "enabled" : true, "policy" : "same-origin" }, + // Detect if the incoming requests are NON-SSL and if enabled, redirect with SSL + "secureSSLRedirects" : { "enabled" : false }, + // Some browsers have built in support for filtering out reflected XSS attacks. Not foolproof, but it assists in XSS protection. + // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-XSS-Protection, + // X-XSS-Protection: 1; mode=block + "xssProtection" : { "enabled" : true, "mode" : "block" } + }, + // JWT Settings + "jwt" : { + // The issuer authority for the tokens, placed in the `iss` claim + "issuer" : "contentbox", + // The jwt secret encoding key to use + "secretKey" : getSystemSetting( "JWT_SECRET", "" ), + // by default it uses the authorization bearer header, but you can also pass a custom one as well or as an rc variable. + "customAuthHeader" : "x-auth-token", + // The expiration in minutes for the jwt tokens + "expiration" : 60, + // If true, enables refresh tokens, longer lived tokens (not implemented yet) + "enableRefreshTokens" : true, + // The default expiration for refresh tokens, defaults to 7 days + "refreshExpiration" : 10080, + // The custom header to inspect for refresh tokens + "customRefreshHeader" : "x-refresh-token", + // If enabled, the JWT validator will inspect the request for refresh tokens and expired access tokens + // It will then automatically refresh them for you and return them back as + // response headers in the same request according to the `customRefreshHeader` and `customAuthHeader` + "enableAutoRefreshValidator" : true, + // Enable the POST > /cbsecurity/refreshtoken API endpoint + "enableRefreshEndpoint" : false, + // encryption algorithm to use, valid algorithms are: HS256, HS384, and HS512 + "algorithm" : "HS512", + // Which claims neds to be present on the jwt token or `TokenInvalidException` upon verification and decoding + "requiredClaims" : [], + // The token storage settings + "tokenStorage" : { + // enable or not, default is true + "enabled" : true, + // A cache key prefix to use when storing the tokens + "keyPrefix" : "cbjwt_", + // The driver to use: db, cachebox or a WireBox ID + "driver" : "db", + // Driver specific properties + "properties" : { + "table" : "cb_jwt", + "autoCreate" : true, + "rotationDays" : 7, + "rotationFrequency" : 60 + } + } + }, + visualizer : { + "enabled" : true, + "secured" : true, + "securityRule" : { "permissions" : "SYSTEM_AUTH_LOGS" } + } + }; + } + +} diff --git a/resources/app/config/modules/cbstorages.cfc b/resources/app/config/modules/cbstorages.cfc new file mode 100644 index 0000000..f3f2455 --- /dev/null +++ b/resources/app/config/modules/cbstorages.cfc @@ -0,0 +1,44 @@ +component { + + function configure(){ + /** + * -------------------------------------------------------------------------- + * ColdBox Storages + * -------------------------------------------------------------------------- + * ContentBox relies on the Cache Storage for tracking sessions, which delegates to a Cache provider + */ + return { + // Cache Storage Settings + cacheStorage : { + // The CacheBox registered cache to store data in + cachename : "sessions", + // The default timeout of the session bucket, defaults to 60 minutes + timeout : getSystemSetting( "COLDBOX_SESSION_TIMEOUT", 60 ), + // The identifierProvider is a closure/udf that will return a unique identifier according to your rules + // If you do not provide one, then we will search in session, cookie and url for the ColdFusion identifier. + // identifierProvider : function(){} + identifierProvider : "" // If it's a simple value, we ignore it. + }, + // Cookie Storage settings + cookieStorage : { + // If browser does not support Secure Sockets Layer (SSL) security, the cookie is not sent. + // To use the cookie, the page must be accessed using the https protocol. + secure : false, + // If yes, sets cookie as httponly so that it cannot be accessed using JavaScripts + httpOnly : true, + // Domain in which cookie is valid and to which cookie content can be sent from the user's system. By default, the cookie + // is only available to the server that set it. Use this attribute to make the cookie available to other servers + domain : "", + // Use encryption of values + useEncryption : false, + // The unique seeding key to use: keep it secret, keep it safe + encryptionSeed : "", + // The algorithm to use: https://cfdocs.org/encrypt + encryptionAlgorithm : "BLOWFISH", + // The encryption encoding to use + encryptionEncoding : "HEX" + } + }; + } + +} diff --git a/resources/app/config/modules/cbswagger.cfc b/resources/app/config/modules/cbswagger.cfc new file mode 100644 index 0000000..5e9e5fa --- /dev/null +++ b/resources/app/config/modules/cbswagger.cfc @@ -0,0 +1,133 @@ +component { + + function configure(){ + /** + * -------------------------------------------------------------------------- + * CBSwagger Configuration + * -------------------------------------------------------------------------- + * https://forgebox.io/view/cbswagger + */ + return { + // The route prefix to search. Routes beginning with this prefix will be determined to be api routes + "routes" : [ "cbapi" ], + // Routes to exclude from the generated spec + "excludeRoutes" : [ "cbapi/v1/:anything/" ], + // The default output format, either json or yml + "defaultFormat" : "json", + // A convention route, relative to your app root, where request/response samples are stored ( e.g. resources/apidocs/responses/[module].[handler].[action].[HTTP Status Code].json ) + "samplesPath" : "resources/apidocs", + // Information about your API + // https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#infoObject + "info" : { + // REQUIRED A title for your API + "title" : "ContentBox CMS API", + // A short description of the application. CommonMark syntax MAY be used for rich text representation. + "description" : "The ContentBox Headless CMS API", + // A URL to the Terms of Service for the API. MUST be in the format of a URL. + "termsOfService" : "", + // Contact information for the exposed API. + "contact" : { + // The identifying name of the contact person/organization. + "name" : "Ortus Solutions", + // The URL pointing to the contact information. MUST be in the format of a URL. + "url" : "https://www.ortussolutions.com", + // The email address of the contact person/organization. MUST be in the format of an email address. + "email" : "info@ortussolutions.com" + }, + // License information for the exposed API. + "license" : { + // The license name used for the API. + "name" : "Apache2", + // A URL to the license used for the API. MUST be in the format of a URL. + "url" : "https://www.apache.org/licenses/LICENSE-2.0.html" + }, + // REQUIRED. The version of the OpenAPI document (which is distinct from the OpenAPI Specification version or the API implementation version). + "version" : "@version.number@" + }, + // An array of Server Objects, which provide connectivity information to a target server. If the servers property is not provided, or is an empty array, the default value would be a Server Object with a url value of /. + // https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#serverObject + "servers" : [ + { + "url" : "http://127.0.0.1:8589", + "description" : "Development Server" + } + ], + // An element to hold various schemas for the specification. + // https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#componentsObject + "components" : { + // Define your security schemes here + // https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#securitySchemeObject + "securitySchemes" : { + "ApiKeyAuth" : { + "type" : "apiKey", + "description" : "User your JWT as an Api Key for security", + "name" : "x-auth-token", + "in" : "header" + }, + "ApiKeyQueryAuth" : { + "type" : "apiKey", + "description" : "User your JWT as an Api Key for security", + "name" : "x-auth-token", + "in" : "query" + }, + "BearerAuth" : { + "type" : "http", + "description" : "User your JWT in the bearer Authorization header", + "scheme" : "bearer", + "bearerFormat" : "JWT" + } + } + }, + // A declaration of which security mechanisms can be used across the API. + // https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#securityRequirementObject + "security" : [ + { "ApiKeyAuth" : [] }, + { "ApiKeyQueryAuth" : [] }, + { "BearerAuth" : [] } + ], + // A list of tags used by the specification with additional metadata. + // https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#tagObject + "tags" : [ + { "name" : "Authors", "description" : "Author operations" }, + { + "name" : "Authentication", + "description" : "Authentication operations" + }, + { + "name" : "Categories", + "description" : "Category operations" + }, + { + "name" : "Comments", + "description" : "Comment operations" + }, + { + "name" : "ContentStore", + "description" : "Content store operations" + }, + { + "name" : "Entries", + "description" : "Blog entry operations" + }, + { "name" : "Menus", "description" : "Menu operations" }, + { "name" : "Pages", "description" : "Pages operations" }, + { "name" : "Sites", "description" : "Site operations" }, + { + "name" : "Settings", + "description" : "Global setting operations" + }, + { + "name" : "Versions", + "description" : "Content versions operations" + } + ], + // Additional external documentation. + // https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#externalDocumentationObject + "externalDocs" : { + "description" : "Find more info here", + "url" : "https://contentbox.ortusbooks.com" + } + }; + } + +} diff --git a/resources/app/config/modules/contentbox.cfc b/resources/app/config/modules/contentbox.cfc new file mode 100644 index 0000000..dadec3c --- /dev/null +++ b/resources/app/config/modules/contentbox.cfc @@ -0,0 +1,38 @@ +component { + + function configure(){ + /** + * -------------------------------------------------------------------------- + * ContentBox Runtime Config + * -------------------------------------------------------------------------- + */ + // Choose a distributed cache + var distributedCache = getSystemSetting( "DISTRIBUTED_CACHE", getSystemSetting( "EXPRESS", false ) ? "express" : "jdbc" ); + + return { + // Array of mixins (eg: /includes/contentHelpers.cfm) to inject into all content objects + "contentHelpers" = [], + // Setting Overrides + "settings" : { + // Global settings + "global" : { + // Distributed Cache For ContentBox + "cb_content_cacheName" = distributedCache == "express" ? "template" : distributedCache, + "cb_rss_cacheName" = distributedCache == "express" ? "template" : distributedCache, + "cb_site_settings_cache" = distributedCache + }, + // Site specific settings according to site slug + "sites" : { + // Default site + "default" = { + // Distributed Cache For ContentBox + "cb_content_cacheName" = distributedCache == "express" ? "template" : distributedCache, + "cb_rss_cacheName" = distributedCache == "express" ? "template" : distributedCache, + "cb_site_settings_cache" = distributedCache + } + } + } + }; + } + +} diff --git a/resources/app/config/modules/htmlhelper.cfc b/resources/app/config/modules/htmlhelper.cfc new file mode 100644 index 0000000..9ba02a3 --- /dev/null +++ b/resources/app/config/modules/htmlhelper.cfc @@ -0,0 +1,19 @@ +component { + + function configure(){ + /** + * -------------------------------------------------------------------------- + * ColdBox HTML Helper Settings + * -------------------------------------------------------------------------- + */ + return { + // The base path of JS assets + js_path : "", + // The base path of CSS assets + css_path : "", + // Encode values on all dynamically generated tags in the HTML Helper + encodeValues : false + }; + } + +} diff --git a/resources/app/config/modules/mementifier.cfc b/resources/app/config/modules/mementifier.cfc new file mode 100644 index 0000000..bc71dc7 --- /dev/null +++ b/resources/app/config/modules/mementifier.cfc @@ -0,0 +1,30 @@ +component { + + function configure(){ + /** + * -------------------------------------------------------------------------- + * Mementifier Settings + * -------------------------------------------------------------------------- + * Mementifier settings: https://forgebox.io/view/mementifier + */ + return { + // Turn on to use the ISO8601 date/time formatting on all processed date/time properites, else use the masks + iso8601Format : true, + // The default date mask to use for date properties + dateMask : "yyyy-MM-dd", + // The default time mask to use for date properties + timeMask : "HH:mm: ss", + // Enable orm auto default includes: If true and an object doesn't have any `memento` struct defined + // this module will create it with all properties and relationships it can find for the target entity + // leveraging the cborm module. + ormAutoIncludes : true, + // The default value for relationships/getters which return null + nullDefaultValue : "", + // Don't check for getters before invoking them + trustedGetters : false, + // If not empty, convert all date/times to the specific timezone + convertToTimezone : "UTC" + }; + } + +} diff --git a/resources/app/engines/server-adobe@2018.json b/resources/app/engines/server-adobe@2018.json new file mode 100644 index 0000000..f4fc5ad --- /dev/null +++ b/resources/app/engines/server-adobe@2018.json @@ -0,0 +1,6 @@ +{ + "JVM":{ + "heapSize":"1024", + "args": "-Dfile.encoding=UTF8 -Dcom.sun.net.ssl.enableECC=false" + } +} diff --git a/resources/app/engines/server-adobe@2021.json b/resources/app/engines/server-adobe@2021.json new file mode 100644 index 0000000..145e9db --- /dev/null +++ b/resources/app/engines/server-adobe@2021.json @@ -0,0 +1,9 @@ +{ + "JVM":{ + "heapSize":"1024", + "args":"-Dfile.encoding=UTF8 -Dcom.sun.net.ssl.enableECC=false" + }, + "scripts":{ + "onServerInstall":"cfpm install adminapi,administrator,sqlserver,postgresql,mysql,zip,spreadsheet,pdf,htmltopdf,image,document,mail,redissessionstorage,caching,chart,orm,debugger,ajax" + } +} diff --git a/resources/app/engines/server-adobe@2023.json b/resources/app/engines/server-adobe@2023.json new file mode 100644 index 0000000..145e9db --- /dev/null +++ b/resources/app/engines/server-adobe@2023.json @@ -0,0 +1,9 @@ +{ + "JVM":{ + "heapSize":"1024", + "args":"-Dfile.encoding=UTF8 -Dcom.sun.net.ssl.enableECC=false" + }, + "scripts":{ + "onServerInstall":"cfpm install adminapi,administrator,sqlserver,postgresql,mysql,zip,spreadsheet,pdf,htmltopdf,image,document,mail,redissessionstorage,caching,chart,orm,debugger,ajax" + } +} diff --git a/resources/app/engines/server-lucee@5.json b/resources/app/engines/server-lucee@5.json new file mode 100644 index 0000000..f981edc --- /dev/null +++ b/resources/app/engines/server-lucee@5.json @@ -0,0 +1,6 @@ +{ + "JVM":{ + "heapSize":"1024", + "args":"-Dfile.encoding=UTF8 -Dcom.sun.net.ssl.enableECC=false -Dlucee-extensions=D062D72F-F8A2-46F0-8CBC91325B2F067B,465E1E35-2425-4F4E-8B3FAB638BD7280A" + } +} diff --git a/resources/app/server.json b/resources/app/server.json deleted file mode 100644 index b9192ae..0000000 --- a/resources/app/server.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name" : "ContentBox", - "jvm":{ - "heapSize": "${JVM_HEAPSIZE:768}", - "args": "-Dlucee-extensions=465E1E35-2425-4F4E-8B3FAB638BD7280A" - }, - "web":{ - "directoryBrowsing": false, - "rewrites":{ - "enable":true - }, - "http":{ - "enable":true, - "port":"${PORT:8080}" - }, - "ssl":{ - "enable":true, - "port":"${SSL_PORT:8443}" - }, - "host":"0.0.0.0" - }, - "openbrowser":"false" -} \ No newline at end of file diff --git a/variants/Adobe2016.Dockerfile b/variants/Adobe2016.Dockerfile deleted file mode 100644 index 332faff..0000000 --- a/variants/Adobe2016.Dockerfile +++ /dev/null @@ -1,13 +0,0 @@ -# syntax = edrevo/dockerfile-plus -INCLUDE+ Dockerfile - -LABEL version="@version@" -LABEL maintainer "Jon Clausen " -LABEL maintainer "Luis Majano " -LABEL repository "https://github.com/Ortus-Solutions/docker-contentbox" - -# Hard Code our engine environment -ENV CFENGINE adobe@2016 - -# WARM UP THE SERVER -RUN ${BUILD_DIR}/util/warmup-server.sh \ No newline at end of file diff --git a/variants/Adobe2018.Dockerfile b/variants/Adobe2018.Dockerfile deleted file mode 100644 index 4d42d6e..0000000 --- a/variants/Adobe2018.Dockerfile +++ /dev/null @@ -1,13 +0,0 @@ -# syntax = edrevo/dockerfile-plus -INCLUDE+ Dockerfile - -LABEL version="@version@" -LABEL maintainer "Jon Clausen " -LABEL maintainer "Luis Majano " -LABEL repository "https://github.com/Ortus-Solutions/docker-contentbox" - -# Hard Code our engine environment -ENV CFENGINE adobe@2018 - -# WARM UP THE SERVER -RUN ${BUILD_DIR}/util/warmup-server.sh \ No newline at end of file diff --git a/variants/Adobe2021.Dockerfile b/variants/Adobe2021.Dockerfile deleted file mode 100644 index dfb30ec..0000000 --- a/variants/Adobe2021.Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -# syntax = edrevo/dockerfile-plus -INCLUDE+ Dockerfile - -LABEL version="@version@" -LABEL maintainer "Jon Clausen " -LABEL maintainer "Luis Majano " -LABEL repository "https://github.com/Ortus-Solutions/docker-contentbox" - -# Hard Code our engine environment -ENV CFENGINE adobe@2021 - -ENV CFPM_INSTALL adminapi,administrator,sqlserver,mysql,zip,spreadsheet,pdf,htmltopdf,image,document,mail,redissessionstorage,caching,chart,orm,debugger,ajax - -# WARM UP THE SERVER -RUN ${BUILD_DIR}/util/warmup-server.sh diff --git a/variants/Alpine.Dockerfile b/variants/Alpine.Dockerfile deleted file mode 100644 index 20ffa47..0000000 --- a/variants/Alpine.Dockerfile +++ /dev/null @@ -1,33 +0,0 @@ -FROM ortussolutions/commandbox:alpine - -# Labels -LABEL version="@version@" -LABEL maintainer "Jon Clausen " -LABEL maintainer "Luis Majano " -LABEL repository "https://github.com/Ortus-Solutions/docker-contentbox" - -# Incoming Secrets/Vars From Build Process -ARG CI_BUILD_NUMBER=1 -ARG CI_BUILD_URL=testmode - -# Copy over our app resources which brings lots of goodness like session distribution, -# db env vars, caching, etc. -COPY ./resources/app/ ${BUILD_DIR}/contentbox-app - -# Copy over ContentBox build scripts -COPY ./build/*.sh ${BUILD_DIR}/contentbox/ - -# Make them executable just in case. -RUN chmod +x ${BUILD_DIR}/contentbox/*.sh - -# Install ContentBox and Dependencies -RUN ${BUILD_DIR}/contentbox/contentbox-setup.sh - -# ContentBox Run -CMD ${BUILD_DIR}/contentbox/contentbox-run.sh - -# Healthcheck environment variables -ENV HEALTHCHECK_URI "http://127.0.0.1:${PORT}/index.cfm" - -# Our healthcheck interval doesn't allow dynamic intervals - Default is 20s intervals with 15 retries -HEALTHCHECK --interval=30s --timeout=30s --retries=2 --start-period=60s CMD curl --fail ${HEALTHCHECK_URI} || exit 1 \ No newline at end of file diff --git a/variants/Lucee5.Dockerfile b/variants/Lucee5.Dockerfile deleted file mode 100644 index 16b375a..0000000 --- a/variants/Lucee5.Dockerfile +++ /dev/null @@ -1,13 +0,0 @@ -# syntax = edrevo/dockerfile-plus -INCLUDE+ Dockerfile - -LABEL version="@version@" -LABEL maintainer "Jon Clausen " -LABEL maintainer "Luis Majano " -LABEL repository "https://github.com/Ortus-Solutions/docker-contentbox" - -# Hard Code our engine environment -ENV CFENGINE lucee@5.3.9+160 - -# WARM UP THE SERVER -RUN ${BUILD_DIR}/util/warmup-server.sh \ No newline at end of file