Skip to content

Kedu-SCCL/docker-koha-community

Repository files navigation

Introduction

Koha

Koha community with below features:

  • Supports external database
  • Supports multiple translation installations
  • Internal and external (OPAC) URLs completely customizable
  • External memcached server

For the impatients

  1. Start the containers
sudo docker-compose up -d --build --force-recreate
  1. Get the username and password for the post-install part. See below entries in the docker compose output:
====================================================
IMPORTANT: credentials needed to post-installation through your browser
Username: koha_koha
Password: type 'docker exec -ti d21a7f723205 koha-passwd koha' to display it
====================================================
  1. Point your browsert to:

http://localhost:8080

And introduce the credentials annotated at step 3

  1. Follow the steps in the browser. At one step you will create the admin credentials. Please annotate them for later use

  2. Once you finished the post-install steps, you can login to:

Admin

http://localhost:8080

Public (OPAC)

http://localhost

In both cases the credentials are the ones annotated at step 5

Environment Variables

DB_HOST

Mandatory. Name of the database server. Should be reachable by koha container.

This image has been tested with mariadb server.

Example:

-e DB_HOST=koha-db

DB_ROOT_PASSWORD

Mandatory. Password of "root" account of "DB_HOST" database server.

Example:

-e DB_ROOT_PASSWORD=secretpassword

DB_PORT

Optional, if not provided set up to "3306".

Port where "DB_HOST" database server is listening.

Example:

-e DB_PORT=3307

KOHA_TRANSLATE_LANGUAGES

Optional, if not provided set up to empty value.

Comma separated list of koha translations to be installed.

To get a full list of available translations:

  1. Start the koha docker container

  2. Connect to it (in this example the docker koha container is named "koha")

docker exec -ti koha bash
  1. Get the list
koha-translate --list --available

Expected output similar to:

am-Ethi
ar-Arab
as-IN
az-AZ
be-BY
bg-Cyrl
bn-IN
ca-ES
cs-CZ
cy-GB
da-DK
de-CH
de-DE
el-GR
en-GB
en-NZ
eo
es-ES
eu
fa-Arab
fi-FI
fo-FO
fr-CA
fr-FR
ga
gd
gl
he-Hebr
hi
hr-HR
hu-HU
hy-Armn
ia
id-ID
iq-CA
is-IS
it-IT
iu-CA
ja-Jpan-JP
ka
km-KH
kn-Knda
ko-Kore-KP
ku-Arab
lo-Laoo
lv
mi-NZ
ml
mon
mr
ms-MY
my
nb-NO
ne-NE
nl-BE
nl-NL
nn-NO
oc
pbr
pl-PL
prs
pt-BR
pt-PT
ro-RO
ru-RU
rw-RW
sd-PK
sk-SK
sl-SI
sq-AL
sr-Cyrl
sv-SE
sw-KE
ta-LK
ta
tet
th-TH
tl-PH
tr-TR
tvl
uk-UA
ur-Arab
vi-VN
zh-Hans-CN
zh-Hant-TW

Example:

-e KOHA_TRANSLATE_LANGUAGES="ca-ES,es-ES"

LIBRARY_NAME

Optional, if not provided set up to "defaultlibraryname".

String containing the library name, used by "koha-create --create-db" command.

Example:

-e LIBRARY_NAME=mylibrary

SLEEP

Optional, if not provided set up to "3".

Time in seconds that the koha image is waiting on to retry connection to external database when installing product for the first time.

Example:

-e SLEEP=2

DOMAIN

Optional, if not provided set up to empty value.

String to build the internal and external (OPAC) URLs:

# OPAC:  http://<OPACPREFIX><OPACSUFFIX><DOMAIN>:<OPACPORT>
# STAFF: http://<INTRAPREFIX><INTRASUFFIX><DOMAIN>:<INTRAPORT>

WARNING: it dows not adds instance name between 'OPACPREFIX' and 'OPACSUFFIX'

Example:

-e DOMAIN=.example.com

INTRAPORT

Optional, if not provided set up to "8080".

String to build the internal and external (OPAC) URLs:

# OPAC:  http://<OPACPREFIX><OPACSUFFIX><DOMAIN>:<OPACPORT>
# STAFF: http://<INTRAPREFIX><INTRASUFFIX><DOMAIN>:<INTRAPORT>

WARNING: it dows not adds instance name between 'OPACPREFIX' and 'OPACSUFFIX'

Example:

-e INTRAPORT=80


## INTRAPREFIX

Optional, if not provided set up to empty value.

String to build the internal and external (OPAC) URLs:

OPAC: http://:

STAFF: http://:


WARNING: it dows not adds instance name between 'OPACPREFIX' and 'OPACSUFFIX'

Example:

-e INTRAPREFIX=library


## INTRASUFFIX

Optional, if not provided set up to empty value.

String to build the internal and external (OPAC) URLs:

OPAC: http://:

STAFF: http://:


WARNING: it dows not adds instance name between 'OPACPREFIX' and 'OPACSUFFIX'

Example:

-e INTRASUFFIX=.admin


## OPACPORT

Optional, if not provided set up to "80".

String to build the internal and external (OPAC) URLs:

OPAC: http://:

STAFF: http://:


WARNING: it dows not adds instance name between 'OPACPREFIX' and 'OPACSUFFIX'

Example:

-e OPACPORT=80


## OPACPREFIX

Optional, if not provided set up to empty value.

String to build the internal and external (OPAC) URLs:

OPAC: http://:

STAFF: http://:


WARNING: it dows not adds instance name between 'OPACPREFIX' and 'OPACSUFFIX'

Example:

-e OPACPREFIX=library


## OPACSUFFIX

Optional, if not provided set up to empty value.

String to build the internal and external (OPAC) URLs:

OPAC: http://:

STAFF: http://:


WARNING: it dows not adds instance name between 'OPACPREFIX' and 'OPACSUFFIX'

Example:

-e OPACPREFIX=opac


# Allowed volumes

We recommend to map "/var/lib/koha".

Example:

-v ~/koha:/var/lib/koha


# Example with admin and OPAC listening on the same port

Below file has been provided:

docker-compose.yml.domain


# Troubleshooting

**TODO**

# Credits

Some ideas has been taken from [QuantumObject/docker-koha](https://github.com/QuantumObject/docker-koha)

About

Koha community with external database and translations

Resources

Stars

Watchers

Forks

Packages

No packages published