Forum OpenACS Development: Re: Docker NaviServer and OpenACS suite on GitHub
Dear all,
here is a short update on the Docker images for OpenACS / NaviServer.
Over the last days, I have worked on a larger cleanup and consolidation effort, with the following results:
All container images now come with a complete and documented build environment (
naviserver,naviserver-pg,naviserver-oracle,mail-relay,munin-node-openacs,munin-master).The design principles of the containers are now explicitly documented, including filesystem layout, volume usage, and configuration strategy.
Added guidelines for local custom builds, in case modifications are required (the images are highly configurable, so rebuilding should only be necessary in rare cases).
Introduced canonical internal paths to simplify maintenance and reduce ambiguity.
Standardized volume handling to make integration of external resources more predictable.
Made it possible to use an OpenACS tree on NFS volumes (with the requirement of an external log directory).
Added the NaviServer
letsencryptto theopenacscontainer for automated certificate renewal (a sample configuration is included but disabled in the examples).
All documentation has been migrated from Docker Hub to GitHub, which now serves as the single authoritative source:
To reduce confusion, I plan to remove the following legacy GitHub repositories, as their content is now fully integrated:
- docker-mail-relay
- docker-munin-master
- docker-munin-node-openacs
The examples in the repository have also been updated. This includes:
oacs-db-inclusive, a single-container setup providing OpenACS together with script directories, log files, content repository, and an integrated database.openacs-org, a slightly simplified variant of the OpenACS.org deployment, where all binaries are provided by containers while all persistent data (log files, content repository, database) is stored externally.
The sample site demonstrates a production-style setup and includes:
- multiple virtual servers
- fully integrated mail delivery via Postfix
- fully integrated monitoring via Munin (automatically configured)
- fully integrated and automated certificate renewal
Feedback and testing reports are, as always, very welcome.
Best regards,
Gustaf
Well done, Gustaf!
This is not at all a small Christmas present, but a great contribution!
I never used Docker before and simply reading the various README I'm starting to understand how Docker could help us to develop and deploy our apps.
I tried the openacs.org example and encountered some small problems:
- an indentation problems in the docker-compose.yml file (there was a space in the volumes: line)
- a syntax problem in the environment, replaced
<<:
- *default-env
- *db-env
with <<: [*default-env, *db-env] - the health check didn't find the expected success.tcl file and I simply commented out the check
- a problem connecting to the host db, but I don't remember the details
Now the container works and I'll test it further in the following days.
Hi Claudio,
The example openacs-org is probably not the best starter example, since it is already quite complex. The example is a down-stripped version of the setup running at openacs.org. It is not intended to work out of the box, since it depends on external resources (the OpenACS source tree, an external database, host-specific networking, etc.). When starting from this example, several adaptations are required for a given site: configuration files, environment variables, database host/port and permissions, and - importantly - making sure the OpenACS checkout is complete and reasonably recent.
If you want an example that works without external dependencies, the oacs-db-inclusive example is the better starting point. It includes the database and does not rely on host resources. BTW, it uses exactly the same YAML merge syntax*as the openacs-org example.
Having said this, there was indeed a stray space in the provided sample docker-compose.yml. YAML syntax is very strict about whitespace, so even a single extra space can break parsing. One can easily check the syntax, for example, with:
docker compose -f docker-compose.yml --env-file .env.example config >/dev/null
Portainer also validates the compose file and will flag such syntax issues immediately.
Regarding the other points:
YAML merge syntax (
<<:) Both forms are valid YAML. If a parser complains, it is usually due to an inconsistency elsewhere (e.g., mixing map-style and list-styleenvironment:entries). The merge syntax itself is fine and used consistently across the examples.Health check and
success.tcl/SYSTEM/success.tclhas been part of OpenACS for many years. If it is missing, this typically indicates an incomplete or overridden OpenACS checkout. Commenting out the health check hides the symptom; the real fix is to ensure the OpenACS tree is complete and correctly mounted.Connecting to the host database Problems here are usually platform-specific (Linux vs macOS/Windows) and related to name resolution (
host.docker.internal), database listen addresses, or permissions. Without the exact error message it’s hard to be precise, but this is a known and solvable class of issues.
Thanks again for testing and for the feedback - it’s very helpful, especially for improving documentation and expectations around the examples.
All the best in the new year!
-g
This is really great. By asking ChatGPT how to install this stack locally on my Mac, I was able to run an OpenACS 5.10.1 instance locally "from zero to hello world" within a few minutes. Very nice. Also, as "install from repository" worked fine from the UI, this allows to try out packages in a vanilla sandbox very conveniently.
I have tested / clicked around in this instance a bit and I found the following issues (not all of them in scope of the containerization-effort, of course, but general issues):
- There is a prominent search box on the start page, but using it results in a "Client Error - The requested file was not found". After adding the search package via the UI, the new error is: "FtsEngineDriver not available!"
- The subsite mounted under /acs-admin/site-wide/ has another theme configured than the main site.
- The page /acs-admin/monitor, which is linked on /acs-admin/, linked on the returns the error "'uptime' command not found on the system".
- The page "/acs-admin/posture-overview" returns the error: "can't read "detailURL": no such variable"
- The class graph is not rendered (image usually included when browsing to e.g. /xotcl/show-object?showmethods=1&showsource=0&object=::Generic::Form)
- Bootstrap util-user-messages seem to have a small UI glitch with respect to the close cross.
- The flush button for the caches shown under /acs-admin/cache/ doesn't succeed for most of the suffixes.
- Running the complete test suite under /test/admin/ resulted in 466 executed test cases, 41258 passes 40 fails and 581 warnings. Some of the created test-users dont have the "testuser" prefix, btw.
- Switching theme to openacsbootstrap5turquois puts the .LRN logo in the upper left corner.
- Page /admin/nsstats?@page=log.smtpsent gives error "could not read "smtpsend.log": no such file or directory"
- The local port under which I could access the instance changed upon every restart, which I didnt expect, but I am sure this can easily avoided by configuration.
Thanks again for this great contribution!