Skip to content

Commit

Permalink
#15: Install Drupal configset for Solr8 via custom Solr8 image.
Browse files Browse the repository at this point in the history
  • Loading branch information
reynoldsalec committed Mar 16, 2023
1 parent 0d66e92 commit a72049e
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build-pantheon-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ jobs:
- image: pantheon-index
tag: 3.6-3
context: recipes/pantheon/3.6-solr
- image: pantheon-index
tag: 8.8-4
context: recipes/pantheon/8.8-solr
- image: pantheon-appserver
tag: 8.1-4
context: recipes/pantheon/8.1-fpm
Expand Down
7 changes: 4 additions & 3 deletions lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,15 +252,16 @@ exports.getPantheonEnvironment = options => ({
* Helper to build index service
*/
exports.getPantheonIndex = options => {
if (options.solrTag === '8') {
if (options.solrTag === '8.8') {
return {
services: {
index: {
type: 'solr:8.11.2',
type: 'solr:8.8.2',
portforward: true,
overrides: {
image: `devwithlando/pantheon-index:${options.solrTag}`,
volumes: [
`${options.confDest}/jetty.xml:/opt/solr-8.11.2/server/etc/jetty.xml`,
`${options.confDest}/jetty.xml:/opt/solr-8.8.2/server/etc/jetty.xml`,
],
},
},
Expand Down
12 changes: 12 additions & 0 deletions recipes/pantheon/8.8-solr/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# docker build -t devwithlando/pantheon-index:8.8-4 .

FROM solr:8.8.2

# replace default configset with correct solr8 drupal config
ENV SOLR_DOWNLOAD="https://ftp.drupal.org/files/projects/search_api_solr-4.x-dev.tar.gz"
ENV SOLR_DEFAULT_CONFIGSET_DIR=/opt/solr/server/solr/configsets/_default/conf
RUN wget -qO- $SOLR_DOWNLOAD | tar xvz -C /tmp

USER root
RUN mv /tmp/search_api_solr/jump-start/solr8/config-set/* $SOLR_DEFAULT_CONFIGSET_DIR

2 changes: 1 addition & 1 deletion recipes/pantheon/builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ module.exports = {
// Set the search version
const searchVersion = _.toString(_.get(options, 'search.version', '3'));
// Set solrtag if search is set to solr8.
if (searchVersion === '8') options.solrTag = searchVersion;
if (searchVersion === '8') options.solrTag = '8.8';
options.database = `${dbService}:${dbVersion}`;
// Set correct things based on framework
options.defaultFiles.vhosts = `${options.framework}.conf.tpl`;
Expand Down

0 comments on commit a72049e

Please sign in to comment.