Docker Underlying File System Type Solr Server Starting Foswiki and Solr Check out timlegge/docker-foswiki Start Foswiki and Solr Resetting the Admin Password Testing Solr within Foswiki Enable Solr Search on Foswiki Solr Admin interface access Starting Foswiki with a non-default port Starting multiple Foswiki Next Steps Included Foswiki Features Foswiki Contribs Foswiki Plugins Foswiki Skin Credits With Docker (and docker-compose) preparing a fully functional production quality Foswiki and Solr environment is simple and easy.Docker Underlying File System TypeBefore you proceed run the following command to ensure your underlying filesystem supports d_type. Docker requires this if the storage driver is overlay2 and the host file system is xfsdocker info
Storage Driver: overlay2
Backing Filesystem: xfs
Supports d_type: trueIf d_type is false you need to recreate your mount point for docker volumes see Docker on CentOS 7 machine with XFS filesystem can cause trouble when d_type is not supportedSolr ServerSolr Server is automatically installed with docker-compose, configured and startedStarting Foswiki and SolrCheck out timlegge/docker-foswikigit clone https://github.com/timlegge/docker-foswiki.git
cd docker-foswikiStart Foswiki and Solrdocker-compose upResetting the Admin Passworddocker exec -it docker-foswiki_foswiki_1 /bin/bash
cd /var/www/foswiki/
tools/configure -save -set {Password}='MyPassword'Testing Solr within Foswikidocker exec -it docker-foswiki_foswiki_1 /bin/bash
cd /var/www/foswiki/tools/
./solrindex topic=Main.WebHome
cd /var/www/foswiki/bin
./rest /SolrPlugin/search | grep CongratThe solrindex command will complain about the lack of a .htpasswd file but should show Indexing topic Main.WebHome. The rest command should search using Solr and grep for congratulations that shows on the Main.WebHomeEnable Solr Search on FoswikiConnect to http://localhost:8765/Login as the admin user (username: admin, password: [as set above])Access http://localhost:8765/bin/configureAccess ExtensionsConfigure AutoTemplatePluginModify ViewTemplate RulesChange 'WebSearch' => 'WebSearchView' to 'WebSearch' => 'SolrSearchView'Save Configuration ChangesConnect to http://localhost:8765/Click SearchType "Congrat" (you should see Main begin to appear)Press Enter (you should see the Solr results for "Congrat" search term)Solr Admin interface accessTo reduce vulnerabilities, the Solr application listens only on the docker Foswiki network that is shared with the Foswiki container. Foswiki can connect to the Solr container but unless you absolutely need to access the admin interface you should not make Solr available on the host server.See Overriding Defaults using an overrides yaml file or add a ports section to the docker-compose.yaml file under the solr section forwarding 8983:8983.Starting Foswiki with a non-default portBy default, docker-compose.yaml settings makes Foswiki to listen on port 8765/tcp. This allows you to run Foswiki and Solr on a server that is already listenning on port 80.See Overriding Defaults using an overrides yaml file or use the FOSWIKI_PORT environment variable :FOSWIKI_PORT=80 docker-compose upStarting multiple FoswikiDocker will allow multiple instances of Foswiki+Solr to run simultaneously and totally independently from each other on the same machine, with the only limit of hardware resources.See Running multiple Instances using the docker-compose -p projectName, possibly with overides yaml files:docker-compose -p project1 -f docker-compose.yaml -f overrides-project1.yml up
docker-compose -p project2 -f docker-compose.yaml -f overrides-project2.yml upNext StepsAt this point you have a working Foswiki and Solr installation. The following would be normal next steps:Configure Foswiki as you would likeConvert dataSetup or configure an nginx proxy 80/443 to port 8765Included Foswiki FeaturesFoswiki ContribsCopyContribDBCacheContribFarscrollContribInfiniteScrollContribJQAutoColorContribJQMomentContribJQPhotoSwipeContribJQSelect2ContribJQSerialPagerContribJQTwistyContribJSTreeContribLdapContribStringifierContribWebFontsContribXSendFileContribFoswiki PluginsAttachContentPluginAutoRedirectPluginAutoTemplatePluginBreadCrumbsPluginCaptchaPluginClassificationPluginDBCachePluginDiffPluginDigestPluginDocumentViewerPluginEditChapterPluginFilterPluginFlexFormPluginFlexWebListPluginGraphvizPluginGridLayoutPluginImageGalleryPluginImagePluginJQDataTablesPluginLdapNgPluginLikePluginListyPluginMediaElementPluginMetaCommentPluginMetaDataPluginMimeIconPluginMoreFormfieldsPluginMultiLingualPluginNatSkinPluginNewUserPluginPageOptimizerPluginPubLinkFixupPluginRedDotPluginRenderPluginSecurityHeadersPluginSolrPluginTagCloudPluginTopicInteractionPluginTopicTitlePluginWebLinkPluginWorkflowPluginFoswiki SkinNatSkinCreditstimlegge/docker-foswiki is based on the original work of michael34435/docker-foswikiThe 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 setupMichel Mallejac contributed the docker-compose.yaml to bring it all togetherTags: alpine-linux, docker, docker-compose, installation, packaging, solr