Configuring docker swish

Hello,

After installing swish via docker, I am trying to follow instructions to configure authentication – however, the instructions given are for locally installed swish. See below:

However, its unclear to me where commands are submitted.

First, there is the mkdir command – I presume it needs to be run in a command line within the swish docker image so, shell needs to be started first (I managed to do that).

mkdir -p config-enabled
(cd config-enabled && ln -s …/config-available/auth_http_always.pl)

(interestingly, this added the auth_http_always, in the config-available directory outside of the docker image within the ubuntu file system – not sure what the mechanism here is)

Then, there is the swish_add_user.

?- swish_add_user.

However, this isn’t a shell command, but appears to be a prolog predicate – and I am wondering how this is done – does one need to start a swipl within docker (tried this, but doesn’t recognize the swish_add_user/0 predicate).

Or, is this done within a browser pointing at the local swish page? (tried that as well, and predicate is also not recognized).

Any help clarify this, would be much appreciated.

Dan

Running SWISH without sandbox limitations

By default, SWISH does not require the user to login but lets you run only safe commands. If you want to use SWISH for unrestricted development, enable the config file auth_http_always.pl :

mkdir -p config-enabled
(cd config-enabled && ln -s ../config-available/auth_http_always.pl)

Next, for first usage, you need to create a user. The authentication module defines swish_add_user/0, which asks for details about the user to be created and updates or creates a file called passwd . At the moment Group and E-Mail are stored, but not used.

?- swish_add_user.

getting closer …

I now downloaded auth_http_always.pl from git into the config_enabled folder; I also ran add user swish docker command, restarted the image, and now get a “sink” error in the browser:

btw, when adding a user I was asked what group, and entered swish – perhaps this is related – not sure what group the new user needs to be part of.

Internal server error

source_sink `passwd’ does not exist

SWI-Prolog httpd at ca8879beb09e

I’m travelling with a poor connection. I think we went through all this, no?. You do all the swish config using docker run -it swish <options> commands. The basic commands are in the readme. You may download swish.sh, which is a simple shell script that simplifies some of these commands a bit. --help shows all commands.

Hi Jan,

Thanks. Yes, we did, but I never got it to work, and am trying again.

Dan