Skip to content

Commit

Permalink
Merge pull request #822 from UN-OCHA/release-versions/v1.6.0
Browse files Browse the repository at this point in the history
release versions/v1.6.0
  • Loading branch information
berliner authored Nov 23, 2023
2 parents 2a957dc + 381db63 commit 35c9fe0
Show file tree
Hide file tree
Showing 453 changed files with 138,619 additions and 5,391 deletions.
46 changes: 46 additions & 0 deletions .docksal/commands/solr
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/usr/bin/env bash

## Import solr backup.
##
## Usage: fin solr [-h] [command]
##

# Environment variables passed from fin:
#
# $PROJECT_ROOT - (string) absolute path to NEAREST .docksal folder
# $VIRTUAL_HOST - (string) ex. projectname.docksal
# $DOCROOT - name of the docroot folder
# $DOCKER_RUNNING - (string) "true" or "false"
# $SOLR_HOST -- (string) the hostname
# $SOLR_PORT -- (integer) the port
# $SOLR_CORE -- (string) the core name

usage="$(basename "$0") [-h] create-core|index|dashboard
where:
-h show this help text"

CONTAINER_BASE_PATH="/var/www/solr"
CONTAINER_DOWNLOAD_PATH="${CONTAINER_BASE_PATH}/backups/downloaded"
CONTAINER_BACKUP_PATH="${CONTAINER_BASE_PATH}/backups/snapshot/snapshot.latest"

while [ "$1" != "" ]; do
case $1 in
create-core ) shift
fin solr-commands/create-core
;;
index ) shift
fin drush search-api:index solr --batch-size=1
;;
dashboard ) shift
fin utils/open-link "http://solr.ghi-site.docksal.site/solr/#/${SOLR_CORE}/core-overview"
;;

-h | --help ) echo "$usage"
exit
;;
* ) echo "$usage"
exit 1
esac
shift
done
33 changes: 33 additions & 0 deletions .docksal/commands/solr-commands/create-core
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/usr/bin/env bash
#: exec_target = solr

## Create solr core.
##
## Usage: fin solr create-core [-h]
##

# Environment variables passed from fin:
#
# $SOLR_HOST -- (string) the hostname
# $SOLR_PORT -- (integer) the port
# $SOLR_CORE -- (string) the core name

usage="$(basename "$0") [-h]
where:
-h show this help text"

echo "Run solr create command"
solr delete -c ${SOLR_CORE} -p 8983

# Create the solr core if necessary.
SOLR_SRC="/opt/solr"
SOLR_ROOT="/var/solr"
SOLR_HOME="${SOLR_ROOT}/data"
SOLR_CORE_DIR="${SOLR_HOME}/${SOLR_CORE}"


# Create core
echo "Run solr create command"
${SOLR_SRC}/bin/solr create -c ${SOLR_CORE} -p 8983 -d /opt/solr/server/solr/configsets/solr811
echo "http://solr.ghi-site.docksal.site/solr/#/${SOLR_CORE}/core-overview"
19 changes: 19 additions & 0 deletions .docksal/commands/utils/open-link
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash

## Open a link in a browser.
##
## Usage: fin utils/open-link [-h] URL
##

usage="$(basename "$0") [-h]
where:
-h show this help text"

if [[ "$OSTYPE" == "linux-gnu"* ]]; then
xdg-open "$@"
elif [[ "$OSTYPE" == "darwin"* ]]; then
open "$@"
else
echo "Unsupported operating system ${OSTYPE}"
fi
7 changes: 6 additions & 1 deletion .docksal/docksal.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
DOCKSAL_STACK=default
DOCROOT=html
DB_IMAGE="docksal/mariadb:10.6"
CLI_IMAGE="docksal/cli:php8.2"
CLI_IMAGE="docksal/cli:php8.2"

SOLR_CORE=ghi
SOLR_PORT=8983
SOLR_PATH=/solr
SOLR_VERSION=8.11.2
16 changes: 15 additions & 1 deletion .docksal/docksal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ services:
- CM_KEY
- MAPBOX_TOKEN
- COMPOSER_MEMORY_LIMIT=-1
- SOLR_CORE
- SOLR_HOST
- SOLR_PORT

web:
environment:
Expand All @@ -36,4 +39,15 @@ services:
ports:
- "8444:8442"
environment:
- ALLOWED_HOSTNAMES=docksal.site
- ALLOWED_HOSTNAMES=docksal.site

# Solr
solr:
image: arm64v8/solr:8
extends:
file: ${HOME}/.docksal/stacks/services.yml
service: solr
volumes:
- ${PROJECT_ROOT}/.docksal/etc/solr/solr811:/opt/solr/server/solr/configsets/solr811
environment:
SOLR_CORE: ${SOLR_CORE:-ghi}
Empty file.
Empty file.
185 changes: 185 additions & 0 deletions .docksal/etc/solr/solr811/accents_ca.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
# À => A
#"\u00C0" => "A"
# Á => A
#"\u00C1" => "A"
# Â => A
#"\u00C2" => "A"
# Ã => A
"\u00C3" => "A"
# Ä => A
"\u00C4" => "A"
# Å => A
"\u00C5" => "A"
# Ą => A
"\u0104" => "A"
# Æ => AE
"\u00C6" => "AE"
# Ç => C
#"\u00C7" => "C"
# Ć => C
"\U0106" => "C"
# È => E
#"\u00C8" => "E"
# É => E
#"\u00C9" => "E"
# Ê => E
#"\u00CA" => "E"
# Ë => E
"\u00CB" => "E"
# Ę => E
"\u0118" => "E"
# Ì => I
#"\u00CC" => "I"
# Í => I
#"\u00CD" => "I"
# Î => I
#"\u00CE" => "I"
# Ï => I
"\u00CF" => "I"
# IJ => IJ
"\u0132" => "IJ"
# Ð => D
"\u00D0" => "D"
# Ł => L
"\u0141" => "L"
# Ñ => N
"\u00D1" => "N"
# Ń => N
"\u0143" => "N"
# Ò => O
#"\u00D2" => "O"
# Ó => O
#"\u00D3" => "O"
# Ô => O
#"\u00D4" => "O"
# Õ => O
"\u00D5" => "O"
# Ö => O
"\u00D6" => "O"
# Ø => O
"\u00D8" => "O"
# Œ => OE
"\u0152" => "OE"
# Þ
"\u00DE" => "TH"
# Ù => U
#"\u00D9" => "U"
# Ú => U
#"\u00DA" => "U"
# Û => U
#"\u00DB" => "U"
# Ü => U
"\u00DC" => "U"
# Ý => Y
#"\u00DD" => "Y"
# Ÿ => Y
"\u0178" => "Y"
# à => a
#"\u00E0" => "a"
# á => a
#"\u00E1" => "a"
# â => a
#"\u00E2" => "a"
# ã => a
"\u00E3" => "a"
# ä => a
"\u00E4" => "a"
# å => a
"\u00E5" => "a"
# æ => ae
"\u00E6" => "ae"
# ç => c
#"\u00E7" => "c"
# è => e
#"\u00E8" => "e"
# é => e
#"\u00E9" => "e"
# ê => e
#"\u00EA" => "e"
# ë => e
"\u00EB" => "e"
# ì => i
#"\u00EC" => "i"
# í => i
#"\u00ED" => "i"
# î => i
#"\u00EE" => "i"
# ï => i
"\u00EF" => "i"
# ij => ij
"\u0133" => "ij"
# ð => d
"\u00F0" => "d"
# ñ => n
"\u00F1" => "n"
# ò => o
#"\u00F2" => "o"
# ó => o
#"\u00F3" => "o"
# ô => o
#"\u00F4" => "o"
# õ => o
"\u00F5" => "o"
# ö => o
"\u00F6" => "o"
# ø => o
"\u00F8" => "o"
# œ => oe
"\u0153" => "oe"
# ß => ss
"\u00DF" => "ss"
# Ś => S
"\u015a" => "S"
# þ => th
"\u00FE" => "th"
# ù => u
#"\u00F9" => "u"
# ú => u
#"\u00FA" => "u"
# û => u
#"\u00FB" => "u"
# ü => u
"\u00FC" => "u"
# ý => y
#"\u00FD" => "y"
# ÿ => y
"\u00FF" => "y"
# Ź => Z
"\u0179" => "Z"
# Ż => Z
"\u017b" => "Z"
# ff => ff
"\uFB00" => "ff"
# fi => fi
"\uFB01" => "fi"
# fl => fl
"\uFB02" => "fl"
# ffi => ffi
"\uFB03" => "ffi"
# ffl => ffl
"\uFB04" => "ffl"
# ſt => st
"\uFB05" => "st"
# st => st
"\uFB06" => "st"
# Māori macrons.
# Ā => A
"\u0100" => "A"
# Ē => E
"\u0112" => "E"
# Ī => I
"\u012A" => "I"
# Ō => O
"\u014C" => "O"
# Ū => U
"\u016A" => "U"
# ā => a
"\u0101" => "a"
# ē => e
"\u0113" => "e"
# ī => i
"\u012B" => "i"
# ō => o
"\u014D" => "o"
# ū => u
"\u016B" => "u"
Loading

0 comments on commit 35c9fe0

Please sign in to comment.