Forum OpenACS Development: New Structured Configuration file for OpenACS

Dear all,

I have added a newly structured OpenACS configuration file to the NaviServer GitHub repository [1].

The main goals of this restructuring are to:

  • Provide a clear and well-defined structure that makes it obvious where different types of configuration belong.
  • Improve Docker-friendliness by

  • increasing the number of settings that can be controlled via environment variables, and

  • automatically activating components when the relevant configuration is present.
  • Serve as a starting point for splitting the configuration into a directory-based layout, making it easy to add or remove components and modules without editing a single monolithic file.
  • Ease version migrations by isolating defaults, derived values, and component/site-specific configuration.

To give an overview, the file is organized into the following logical sections:

######################################################################
#
# Configuration structure overview
#
# Section 0 – Bootstrap & defaults (pure Tcl)
#    - Logging and environment checks
#    - defaultConfig dictionary and overrides (ns_configure_variables, CLI)
#    - Derivation of basic variables: server, serverroot, homedir, logdir,
#      hostname/ipaddress/httpport/httpsport, pageroot, etc.
#
# Section 1 – Global NaviServer parameters (ns/parameters)
#    - Core ns/parameters
#    - Optional reverse proxy mode (ns/parameters/reverseproxymode)
#
# Section 2 – Global network drivers & modules
#    - HTTP driver (nssock) as module "http"
#    - HTTPS driver (nsssl) as module "https"
#    - Global driver options and virtual-host mappings
#
# Section 3 – Global runtime configuration
#    - Thread library parameters (ns/threads)
#    - Extra MIME types (ns/mimetypes)
#    - Global fastpath configuration (ns/fastpath)
#
# Section 4 – Global database drivers and pools
#    - ns/db/drivers
#    - ns/db/driver-specific settings (e.g. postgres, nsoracle)
#    - ns/db/pools and pool definitions
#
# Section 5 – Global utility modules
#    - Global modules not bound to a specific server
#      (e.g. nsstats, future monitoring or helper modules)
#
# Section 6 – Server configurations
#    - Pools, redirects, ADP, Tcl, fastpath, HTTP client,
#      per-server modules
#
# Section 7 – Final diagnostics / sample extras
#    - Final ns_log diagnostics
#
######################################################################

The file is intended both as a usable default and as a reference configuration that documents recommended structure and best practices going forward. Feedback, suggestions, and follow-up patches are as always welcome.

All the best
-g

[1] https://raw.githubusercontent.com/naviserver-project/naviserver/refs/heads/main/openacs-config.tcl