You now have a running foswiki and solr container, and need to finalize some settings to ensure your work is complete.
- Enable Force HTTPS.
- Enable HTTPS.
Login to the docker machine by identifying the container docker ps
.
root@ubuntu-8gb-nbg1-1:~# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
d392b0392d5e timlegge/docker-foswiki:latest "sh docker-entrypoin…" 13 hours ago Up 13 hours 80/tcp srv-captain--foswiki.1.rl7vmf0qep9e8lbp2hqi4hp9o
and then using docker exec -ti d392b0392d5e /bin/bash
to login to the machine.
cd /var/www/foswiki/
tools/configure -save -set {Password}='MyPassword'
- Login to CapRover Dashboard.
- Select the app created.
- Choose Enable HTTPS.
- Tick the checkbox "Force HTTPS by redirecting all HTTP traffic to HTTPS"
- Click on
Save & Update
.
- Connect to https://foswiki.exapmle.com/
- Login as the admin user (username: admin, password: [as set above])
- Access https://foswiki.exapmle.com/bin/configure
These settings are needed to ensure that your application can load java scripts and images.
- Login to foswiki as an administrator.
- Under "General settings".
- Access "Web URLs and Paths".
- Click on "Show expert options".
- Activate the checkbox for "ForceDefaultUrlHost".
- Click "Save"
- Confirm Changes.
There are some small settings needed to ensure that the search works properly. At this point, there is a small caveat which means when the Solr container has been restarted, the URL must be changed.
This takes a few minutes.
-
Login to the container.
cd /var/www/foswiki/tools ./solrindex mode=full optimize=on
Tip:
You can do a partial test by running ./solrindex topic=Main.WebHome
.
- Login to foswiki as an administrator.
- Access Extensions
- Configure "SolrPlugin"
- Modify "{SolrPlugin}{Url}" by using the container name found with
docker ps
. (i.e.) http://srv-captain--foswiki.1.rl7vmf0qep9e8lbp2hqi4hp9o:8983/solr/foswiki
- Modify "{SolrPlugin}{Url}" by using the container name found with
- Configure "AutoTemplatePlugin"
- Modify "{Plugins}{AutoTemplatePlugin}{ViewTemplateRules} " Rules
- Change
'WebSearch' => 'WebSearchView' to 'WebSearch' => 'SolrSearchView'
- Save Configuration Changes
- Configure "SolrPlugin"
- Connect to http://foswiki.example.com/
- Click Search
- Type "Congrats" (you should see Main begin to appear)
- Press Enter (you should see the Solr results for "Congrats" search term)
- Login to foswiki as an administrator.
- Access Extensions.
- Configure "SolrPlugin".
- Activate "EnableOnSaveUpdates".
- Activate "EnableOnUploadUpdates".
- Configure "SolrPlugin".
Warning:
{SolrPlugin}{Url} needs to be changed, if the solr container is restarted.
-
Set up a new user, and add them to the Admin Group.
-
Clear the shared administrator password.
- Login to foswiki as an administrator.
- Access "Security and Authentication".
- Configure "Passwords".
- Empty the value for "Internal Admin Password: {Password}".
- Save Configuration Changes
- timlegge/docker-foswiki is based on the original work of michael34435 docker-foswiki.
- The Alpine Linux project was very helpful in approving the required perl-modules that were submitted (full native packages to support Foswiki).
- Solr and their docker container simplified Solr setup.
- Shawn Beasley for the one-click app integration into CapRover.