View · Search · Index

Setup with docker-s6

Basic installation

A quick way to install and test-drive OpenACS is via docker. The s6 docker images were developed by Vlad and use the docker overlay structures as supported by docker-compose, which is a tool for defining and running multi-container Docker applications.

The minimal setup for testing is to get the repository

    git clone https://github.com/gustafn/openacs-s6
    cd openacs-s6

and to run there e.g.

   OACS_LISTEN_PORT=8072 docker-compose up

This command installs OpenACS (oacs-5-10) from GitHub, PostgreSQL (12.6) and NaviServer 4.99.21 and starts the server on port 8072. The gustafn repository is lightly more advanced than the repository of Vlad, the versions should be merged and probably moved to the openacs project on github.

More advanced installations

In some cases, a developer might need more control over versions used, running multiple different OpenACS versions and instances in parallel, etc. Docker allows to compose newly configured setups more or less on the fly via specifying more command line options, or via .env files. Such a setup can be provided by creating the docker-compose setup on a common place on the machine and by creating multiple .env files.

    git clone https://github.com/gustafn/openacs-s6 /var/www/openacs/docker-s6
    cd /var/www/openacs/docker-s6

Create in this directory e.g. a file named oacs1.env with the following content:

# * Define port and project name
OACS_LISTEN_PORT="${OACS_LISTEN_PORT:-8071}"
COMPOSE_PROJECT_NAME="${COMPOSE_PROJECT_NAME:-oacs-8071}"

# * Using potentially different compose files
COMPOSE_FILE="${COMPOSE_FILE:-docker-compose.yaml}"

# * Common
TZ="${TZ:-UTC}"

# * OpenACS
NS_CONF="${NS_CONF:-/usr/local/ns/conf/openacs_config.tcl}"
NS_VARS="${NS_VARS:-/usr/local/ns/conf/config_vars.tcl}"

# * Postgres
DB_HOST="${DB_HOST:-postgres}"
DB_NAME="${DB_NAME:-openacs}"
DB_PASS="${DB_PASS:-testing}"
DB_USER="${DB_USER:-openacs}"

POSTGRES_OFFICIAL_TAG="10-alpine"
POSTGRES_DATACORE_TAG="10.12"

Important variables are the listen port (OACS_LISTEN_PORT), the project name (COMPOSE_PROJECT_NAME) for running multiple instances at the same time without conflicting. In order to install other versions than the default (oacs-5-10), the variable OACS_TAG can be used. See for more details the README file on GitHub (openacs-s6). For multiple instances, multiple such .env-files can be created.

To use an .env file oacs1.env one can run it as follows

    (cd /var/www/openacs/docker-s6; /usr/local/bin/docker-compose --env-file oacs1.env up)

or run it in daemon mode by adding  a “-d” after up.

Preliminaries

To use this setup recent versions of docker and docker-compose are needed. There is a constant development especially on docker-compose. The setup is tested with docker-compose 1.27 (as provided by macPorts on macOS) and with docker-compose 1.29 under Linux. For docker-compose under Linux, it us usually sufficient to get the binary (single file) from the docker download pages.

https://docs.docker.com/
https://docs.docker.com/compose/

previous August 2021
Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31 1 2 3 4

Popular tags

17 , 5.10.0 , 5.9.0 , 5.9.1 , ad_form , ADP , ajax , aolserver , asynchronous , bgdelivery , bootstrap , bugtracker , CentOS , COMET , compatibility , CSP , CSRF , cvs , debian , emacs , engineering-standards , exec , fedora , FreeBSD , guidelines , host-node-map , hstore , includelets , install , installation
No registered users in community xowiki
in last 30 minutes
Contributors

OpenACS.org