Forum OpenACS Development: OpenACS/NaviServer docker images using s6-overlay

Hello all,

For testing purpose I've created the following projects:

  1. NaviServer on Ubuntu image using S6. This is Naviserver on ubuntu base docker image (version 20.04) using s6-overlay. To install the Naviserver I used code from Gustaf Neumann script install-ns.sh. The base image is oupfiz5/ubuntu-s6. Naviserver-S6 is self-hosting at https://chiselapp.com/user/oupfiz5/repository/naviserver-s6. Git mirroring is https://github.com/oupfiz5/naviserver-s6 .
  2. OpenACS on Ubuntu image using S6. This is OpenACS on ubuntu base docker image (version 20.04) using s6-overlay. To install the OpenACS I used code from Gustaf Neumann script install-oacs.sh. The base image is oupfiz5/naviserver-s6. OpenACS-S6 is self-hosting at https://chiselapp.com/user/oupfiz5/repository/openacs-s6. Git mirroring is https://github.com/oupfiz5/openacs-s6 .
  3. Ubuntu base docker image for build tcl packages (using for multistep buld). This is ubuntu base docker image (version 20.04) using s6-overlay for buid tcl software. The basic idea was taken from tcl2020-build . Tcl-build is self-hosting at https://chiselapp.com/user/oupfiz5/repository/tcl-build. Git mirroring is https://github.com/oupfiz5/tcl-build .

    All projects use on Github Actions workflow (simple CI/CD) to build ans push docker images.

Collapse
Posted by Gustaf Neumann on
Dear Vlad,

this sounds like a great contribution! I have tried the dockerized NaviServer version in oupfiz5/naviserver-s6:latest and it worked immediately perfectly.

On https://github.com/oupfiz5/openacs-s6 a problem with the DB port prohibited the start:

ERROR: for postgres Cannot start service postgres: Ports are not available: listen tcp 0.0.0.0:5432: bind: address already in use

Does it really conflict with the DB port in the host environment?

all the best

Collapse
Posted by Vlad V on

Gustaf, thanks.

You are right with your assumption.

The docker-compose file contains configuration parameter for postgres:

...
ports:
  - 5432:5432
...

From docs https://docs.docker.com/compose/compose-file/compose-file-v3/#ports the first value is host port. If it is busy the postgres will not run.

Probably "..address already in use for docker-compose" from https://stackoverflow.com/questions/47069540/docker-compose-postgres-5432-bind-address-already-in-use-error may become a solution ?

In near time I will modify docker-compose file that the first port value read from variable (for exclude bind address conflicts on local computer).

Collapse
Posted by Vlad V on

Done. For postgres from docker-compose specified just the container port - 5432 (an ephemeral host port is chosen for the host port).

Collapse
Posted by Brian Fenton on
Congrats! This is great work.

Brian

Collapse
Posted by Gustaf Neumann on
Vlad, many thanks, it works now nicely, no conflicts with a pg instance running already on the same server.

I have just made a pull request for a small change to (a) fetch per tag (e.g. oacs-5-10) and to get the data from GitHub (provides tarballs per tag).

It would be probably also a good idea to activate in the base configuration already the "openacs-bootstrap3-theme" which improves the first user impression...

all the best
-gn

Collapse
Posted by Gustaf Neumann on
I have added the bootstrap3-theme and whats needed to use the Theme to the Dockerfile and updated the pull request.
Collapse
Posted by Vlad V on

fix: migrated oacs to version 5.10 and naviserver to version 4.99.21

Changes:

  • Dockerfile:
    • using git archive
    • using tag instead version
    • install openacs-bootstrap3-theme
    • install and configure extra OpenACS packages
  • Code:
    • avoid error message about not-yet-created tables for initial installs (rootfs/var/www/openacs/www/SYSTEM/openacs-test.tcl )
    • added missing file ( rootfs/usr/local/ns/conf/install-oacs-core-config.xml )
  • Docs:
    • fix some names (capitalize)
Collapse
Posted by Gustaf Neumann on
Dear Vlad, many thanks, this is very nice.

In case, you have not noticed, i've added more more pull request to the the naming of configuration variables more consistent (using always "OACS_" as prefix, and not "OA_" for the port). .. Just a small change, but better to be done, before too many instances depend on the naming.

all the best
-g