Forum OpenACS Q&A: How to customize installing openacs-s6 stack to connect w/ postgres on the host?

We have the openacs-s6 stack with 2 docker containers,
one openacs and .the other postgres-alpine 10.
What's the latest version of postgres that we can use?
and
Is the following documentation (pasted below)
in Chapter 7. on our server still an option and
how would we edit the oacs1.env file on:
https://openacs.org/xowiki/setup-with-docker-s6 ?:
Chapter 7. Running a PostgreSQL database on another server

To run a database on a different machine than the webserver requires changes to the database configuration file and access control file, and to the OpenACS service's configuration file.

Edit the database configuration file, which in a Reference install is located at /usr/local/pgsql/data/postgresql.conf and change

#tcpip_socket = false

to

tcpip_socket = true

Change the access control file for the database to permit specific remote clients to access. Access can be controlled ... (add notes from forum post)

Change the OpenACS service's configuration file to point to the remote database. Edit /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/config.tcl and change

to

What's the latest version of postgres that we can use?
PostgreSQL 14.1

The second question is not clear to me: Do you want to run OpenACS in a container and the database on some other host?

In this case, the question is not about modifying the container configuration, but rather about how to change the OpenACS configuration file. In the configuration file, you have to change the "db_host" to the host in question. Make sure that the firewall rules on the database host allow access from the machine/container, on which OpenACS runs.

Yes we do want to customize and use s6 to create one container that connects to a postgres 14 on the host.

I'm not sure we have tried your solution, just yet. But I will let you know by the time we finish working on it now.

We have tried to replicate the openacs-s6 install ( http://la.caltek.net:8080 ) on a different server for the 5th time.

Please click the link (below) to see the log of the instance that is hanging while it is installing the oacs templating package which is added as a dependence when installing the file-storage package: https://litli.net/xowiki/file/_openacs-s6_openacs_1_logs.txt

We are not able to access the postgres on the host from within the s6 container. Should we still edit the files anyway?
i did try the bridge, redefining host etc... there are so many options and ways to do it - still confusing for me.
Please click the link (below) to see the log of the instance that is hanging
What makes you think, it is hanging?

The log-file starts with:

[25/Jan/2022:05:11:13][341.7fca32e41800][-main:openacs-] Notice: Loading packages/acs-templating/tcl/tag-init.tcl...
which is the -init file of acs-templating (remember, all -init files are loaded after the loading of all -procs files).

Then it is loading the rest of OpenACS

Bootstrap: Done loading OpenACS.
before it activates the network drivers.

Everything which can be seen in this log file worked perfectly.

We are not able to access the postgres on the host from within the s6 container. Should we still edit the files anyway?

My guess is that you are trying from the wrong container. I am using docker-desktop on my development machine (similar programs are there as well for all OSes). With that, you can open a console via the GUI (2nd button from the left)

inside the container, you have a somewhat minimal Linux, where you might have to load more packages to get your usual working environment. I for my part usually install vi to be able to edit config files.

i did try the bridge, redefining host etc... there are so many options and ways to do it - still confusing for me.

It is true, docker is not the simplest for starters, especially if it does not work. It took me as well a while to get a vague understanding. With docker-compose, one is pulling in also multiple images to start with, which can also change, which is sometimes good and sometimes bad (like a Linux distribution)