Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Downloading Library system (Koha or other similar) to Docker

Featured Replies

Hi, 

 

I am new to Unraid and exploring the applications on docker, Our server running as storage for a Buddhist Centre and we have had a library that hasn't been possible to take books out of for a long time, I'm hoping to use this server to also host a library so that people who come to our centre can get books out. The reason I was interested in an application called Koha is because our physical library is fairly large and because we are thinking of (in the future) upgrading to get a kiosk and Koha is an application which can also work with various Kiosks. Is it possible to launch this from our unraid server and by chance would anyone be able to offer advise so that we can do so? any help/support would be greatly appreciated.

 

https://git.koha-community.org/koha-community/koha

 

 

Solved by bmartino1

  • Community Expert
  • Solution

I don't know this software and it appears to be a Debian install system. You can use VMs and/or LXC and install a Debian OS to install koha... However, To accomplish the use we need to use docker compose...

 

Are you familiar with Calibre?

https://calibre-ebook.com/

 

Docker compose for Calibre docker run on unraid example:

https://github.com/artiomn/library-docker

 

I mention only because a Unraid CA template already exists:

image.thumb.png.ce299f62795a6ede62dc5d616f2acb01.png


Community app install docker compose plugin.
image.thumb.png.9f806de7e0def0827090fb3c12950624.png

In docker web UI add a new stack and set path.

Example...

image.thumb.png.9a33fa8a78ba5b8cd9d2c5ad43e29d37.png

 

Edit stack > compose file

image.thumb.png.d08b802f5752c67b5a5435ca110d3b3d.png

 

Make needed edits and compose up to run ...

 

Koha exist in docker form already...

It looks like someone made a koha docker stack already:

 

GitHub:

https://github.com/teogramm/koha-docker

 

Koha example docker compose file:

https://github.com/teogramm/koha-docker/blob/main/examples/docker-compose.yaml

 

Unraid may need some small edits


So, This docker github may need cloned and files within pointed for volume mout pathing...

 

cd /mnt/user/appdata/
git clone https://github.com/teogramm/koha-docker.git
cd koha-docker/
ls

 

this make the advance toggle at making the stack located at:

/mnt/user/appdata/koha-docker

image.thumb.png.9a33fa8a78ba5b8cd9d2c5ad43e29d37.png

 

Some adational folder may need created..

mkdir -p /mnt/user/appdata/koha-docker/data/
mkdir -p /mnt/user/appdata/koha-docker/data/koha
mkdir -p /mnt/user/appdata/koha-docker/data/mariadb
mkdir -p /mnt/user/appdata/koha-docker/data/rabbitmq_plugins

 

Lets also have the docker create its own bridge network.

 

a updated unraid docker compose file example

#version: "3.9"

services:
  koha:
    image: teogramm/koha:24.11
    container_name: koha
    hostname: koha
    ports:
      - 8080:8080
      - 8081:8081
    networks:
      - koha-net
    cap_add:
      - DAC_READ_SEARCH
      - SYS_NICE
    environment:
      MYSQL_SERVER: db
      MYSQL_USER: koha_teolib
      MYSQL_PASSWORD: Change-Me-Mysql
      DB_NAME: koha_teolib
      MEMCACHED_SERVERS: memcached:11211
      MB_HOST: rabbitmq
    depends_on:
      - db
      - rabbitmq
      - memcached
    volumes:
      - koha-data:/var/lib/koha

  rabbitmq:
    image: rabbitmq:3
    container_name: rabbitmq
    hostname: rabbitmq
    volumes:
      - rabbitmq-plugins:/etc/rabbitmq/enabled_plugins
    networks:
      - koha-net

  db:
    image: mariadb:11
    container_name: mariadb-koha
    hostname: db
    volumes:
      - mariadb-koha:/var/lib/mysql
    environment:
      MARIADB_ROOT_PASSWORD: Change-Me-Mysql
      MARIADB_DATABASE: koha_teolib
      MARIADB_USER: koha_teolib
      MARIADB_PASSWORD: Change-Me-Mysql
    networks:
      - koha-net

  memcached:
    image: memcached
    container_name: memcached
    hostname: memcached
    networks:
      - koha-net

volumes:
  koha-data:
    driver: local
    driver_opts:
      type: none
      device: /mnt/user/appdata/koha-docker/data/koha
      o: bind

  mariadb-koha:
    driver: local
    driver_opts:
      type: none
      device: /mnt/user/appdata/koha-docker/data/mariadb
      o: bind

  rabbitmq-plugins:
    driver: local
    driver_opts:
      type: none
      device: /mnt/user/appdata/koha-docker/data/rabbitmq_plugins
      o: bind

networks:
  koha-net:
    driver: bridge
    ipam:
      config:
        - subnet: 172.18.0.0/16
          gateway: 172.18.0.1

 

-Please set a secure password for your mara db:

 

This needs updated in the Koha section and the db section.

MYSQL_PASSWORD: Change-Me-Mysql

Edited by bmartino1
Data

  • Author

Thanks so much for the detailed explanation - It's great there is a docker and thanks for posting the stack information - That is exactly what I was looking for. Unfortunately I am getting an error message I am not so sure how to get rid of. I did download Rabbit MQ before running the stack and tried uninstalling it and reinstalling it - So perhaps I am get getting the error message because of that? I'm not sure if you know how I could fix this? I tried uninstalling the the Rabbitmq I had previously installed too because I guess the stack installs it anyway - I still receive the same error though.

 

Thanks again for the help! 

 

 

Errormessage2.thumb.png.075a1400339984a643452c95f4d0039a.png

Edited by Jamyang_Server

  • Community Expert
3 hours ago, Jamyang_Server said:

Thanks so much for the detailed explanation - It's great there is a docker and thanks for posting the stack information - That is exactly what I was looking for. Unfortunately I am getting an error message I am not so sure how to get rid of. I did download Rabbit MQ before running the stack and tried uninstalling it and reinstalling it - So perhaps I am get getting the error message because of that? I'm not sure if you know how I could fix this? I tried uninstalling the the Rabbitmq I had previously installed too because I guess the stack installs it anyway - I still receive the same error though.

 

Thanks again for the help! 

 

 

Errormessage2.thumb.png.075a1400339984a643452c95f4d0039a.png

 

not sure to be honest.

the error you have has somehtign to do with teh compose fiel in this section:

 

  rabbitmq:
    image: rabbitmq:3
    container_name: rabbitmq
    hostname: rabbitmq
    volumes:
      - rabbitmq-plugins:/etc/rabbitmq/enabled_plugins
    networks:
      - koha-net

and the volume section where we mount a folder path for it.

  rabbitmq-plugins:
    driver: local
    driver_opts:
      type: none
      device: /mnt/user/appdata/koha-docker/data/rabbitmq_plugins
      o: bind

 

Quote

Error response from daemon: source ... /enabled_plugins is not a directory

means Docker tried to mount a volume into /etc/rabbitmq/enabled_plugins, but the source path you're mapping from is not a directory

 

This is why we made a data path to specfy where teh data is saved at.

 

mkdir -p /mnt/user/appdata/koha-docker/data/
mkdir -p /mnt/user/appdata/koha-docker/data/koha
mkdir -p /mnt/user/appdata/koha-docker/data/mariadb
mkdir -p /mnt/user/appdata/koha-docker/data/rabbitmq_plugins

 

-If you don’t need custom plugins right now, you can comment out or remove the mount entirely, and RabbitMQ will run fine with defaults:

adding a "#"

 

#version: "3.9"

services:
  koha:
    image: teogramm/koha:24.11
    container_name: koha
    hostname: koha
    ports:
      - 8080:8080
      - 8081:8081
    networks:
      - koha-net
    cap_add:
      - DAC_READ_SEARCH
      - SYS_NICE
    environment:
      MYSQL_SERVER: db
      MYSQL_USER: koha_teolib
      MYSQL_PASSWORD: Change-Me-Mysql
      DB_NAME: koha_teolib
      MEMCACHED_SERVERS: memcached:11211
      MB_HOST: rabbitmq
    depends_on:
      - db
      - rabbitmq
      - memcached
    volumes:
      - koha-data:/var/lib/koha

  rabbitmq:
    image: rabbitmq:3
    container_name: rabbitmq
    hostname: rabbitmq
    volumes:
#      - rabbitmq-plugins:/etc/rabbitmq/enabled_plugins
    networks:
      - koha-net

  db:
    image: mariadb:11
    container_name: mariadb-koha
    hostname: db
    volumes:
      - mariadb-koha:/var/lib/mysql
    environment:
      MARIADB_ROOT_PASSWORD: Change-Me-Mysql
      MARIADB_DATABASE: koha_teolib
      MARIADB_USER: koha_teolib
      MARIADB_PASSWORD: Change-Me-Mysql
    networks:
      - koha-net

  memcached:
    image: memcached
    container_name: memcached
    hostname: memcached
    networks:
      - koha-net

volumes:
  koha-data:
    driver: local
    driver_opts:
      type: none
      device: /mnt/user/appdata/koha-docker/data/koha
      o: bind

  mariadb-koha:
    driver: local
    driver_opts:
      type: none
      device: /mnt/user/appdata/koha-docker/data/mariadb
      o: bind

#  rabbitmq-plugins:
#    driver: local
#    driver_opts:
#      type: none
#      device: /mnt/user/appdata/koha-docker/data/rabbitmq_plugins
#      o: bind

networks:
  koha-net:
    driver: bridge
    ipam:
      config:
        - subnet: 172.18.0.0/16
          gateway: 172.18.0.1

 

then koha should be accessble at unraids ip at prt 8080
 

  • Author

I think I didn't add the date path which you specified, where would I input this:

 

mkdir -p /mnt/user/appdata/koha-docker/data/

mkdir -p /mnt/user/appdata/koha-docker/data/koha

mkdir -p /mnt/user/appdata/koha-docker/data/mariadb

mkdir -p /mnt/user/appdata/koha-docker/data/rabbitmq_plugins

 

sorry if simple questions I am new to all this

 

  • Author
4 minutes ago, bmartino1 said:

-If you don’t need custom plugins right now, you can comment out or remove the mount entirely, and RabbitMQ will run fine with defaults:

adding a "#"

Also I tried without the plug-in but it didn't seem to launch - it seems the plug-in is integral to the launching of the app

  • Author
18 minutes ago, bmartino1 said:
 rabbitmq:
    image: rabbitmq:3
    container_name: rabbitmq
    hostname: rabbitmq
    volumes:
      - rabbitmq-plugins:/etc/rabbitmq/enabled_plugins
    networks:
      - koha-net

Okay bingo, I managed to get it to launch by changing the section you specified and using the directory in the error message to make them match - we are up and running, thanks so much for the support! This will be so beneficial for our centre

  • Community Expert

The root problem is that RabbitMQ expects /etc/rabbitmq/enabled_plugins to be a file, not a directory

Your good. Let me make a step by step order. thats my bad. we may need to start over. this means delete the stack and delete the remaining folder on disk.

image.png.7842802b3a37e5fc99cc21a84f51538d.png

image.png.754d22ba34c95cc6913236b3a5093880.png

rm -rf /mnt/user/appdata/koha-docker

 

With the stack removed, we can start over...
 

so steps 1 are the make paths steps. this is where we use the git clone for the repo to have its data to what i'm running. This is to assist the docker and to have a known code of whats running.

 

Commands to run to make the correct folder / files and directory...

cd /mnt/user/appdata/
git clone https://github.com/teogramm/koha-docker.git
cd koha-docker/
ls

 

This is where the docker compose file will live and be used for additional data latter...

mkdir -p /mnt/user/appdata/koha-docker/data/
mkdir -p /mnt/user/appdata/koha-docker/data/mariadb
mkdir -p /mnt/user/appdata/koha-docker/data/rabbitmq_plugins
touch /mnt/user/appdata/koha-docker/data/rabbitmq_plugins/enabled_plugins
chmod 777 -R /mnt/user/appdata/koha-docker/
chown nobody:users -R /mnt/user/appdata/koha-docker/

 

image.png.b8d0c71030d78a0e6d72daec5281da3f.png

 

Each docker need its own place to mount and store data.
/mnt/user can't be used. Either a folder pre created, or a share to point for space.
image.png.ac08a0b552fa3334aea2a9f6aef81c3f.png

 

with data path known, I then make the docker in the web ui. lets make a stack

image.png.bfea36b743b14d5d70fbbfaa71b78db9.png

then edit stack and paste the docker compose:


Let me run it and test and get it work use this compose in the end...

#version: "3.9"

services:
  koha:
    image: teogramm/koha:24.11
    container_name: koha
    hostname: koha
    ports:
      - 8080:8080
      - 8081:8081
    networks:
      - koha-net
    cap_add:
      - DAC_READ_SEARCH
      - SYS_NICE
    environment:
      MYSQL_SERVER: db
      MYSQL_USER: koha_teolib
      MYSQL_PASSWORD: Change-Me-Mysql
      DB_NAME: koha_teolib
      MEMCACHED_SERVERS: memcached:11211
      MB_HOST: rabbitmq
    depends_on:
      - db
      - rabbitmq
      - memcached
    labels:
      net.unraid.docker.webui: http://[IP]:[PORT:8080]
      net.unraid.docker.icon: 
      folder.view: koha-docker
      net.unraid.docker.managed: 'composeman'

  rabbitmq:
    image: rabbitmq:3
    container_name: rabbitmq
    hostname: rabbitmq
    volumes:
      - /mnt/user/appdata/koha-docker/data/rabbitmq_plugins/enabled_plugins:/etc/rabbitmq/enabled_plugins
    networks:
      - koha-net
    labels:
      folder.view: koha-docker
      net.unraid.docker.managed: 'composeman'

  db:
    image: mariadb:11
    container_name: mariadb-koha
    hostname: db
    volumes:
      - mariadb-koha:/var/lib/mysql
    environment:
      MARIADB_ROOT_PASSWORD: Change-Me-Mysql
      MARIADB_DATABASE: koha_teolib
      MARIADB_USER: koha_teolib
      MARIADB_PASSWORD: Change-Me-Mysql
    networks:
      - koha-net
    labels:
      folder.view: koha-docker
      net.unraid.docker.managed: 'composeman'

  memcached:
    image: memcached
    container_name: memcached
    hostname: memcached
    networks:
      - koha-net
    labels:
      folder.view: koha-docker
      net.unraid.docker.managed: 'composeman'

volumes:
  mariadb-koha:
    driver: local
    driver_opts:
      type: none
      device: /mnt/user/appdata/koha-docker/data/mariadb
      o: bind

networks:
  koha-net:
    driver: bridge
    ipam:
      config:
        - subnet: 172.18.0.0/16
          gateway: 172.18.0.1

-Remember to set the passwords...

 

I added the unraid only additional Labels prompt after clicking ok will then open the stack UI labels where we can make the dockers look nice.

image.thumb.png.228788aff19792aee64d4fe1d5fcc958.png

 

 

the docker will then pull and run by clicking the compose up:

image.thumb.png.beb8b6818cb04857287388b5eebdf12d.png

 

image.thumb.png.222b70af7a1c8665e23d0154862eb647.png

 

image.png.667cf0ea45599cd3ec8e37c670ad4dbb.png

 

at that point koha is runnign and buildign the database..
image.png.3e2940bedbd73e8d9c5f678be2574fcc.png

image.thumb.png.f4b0f5e902e648dace2f71c2575f5cf0.png

 

 

 

 

Edited by bmartino1
Data - typo

  • Community Expert

as i'm looking more into this. Reviewing the github and koh comunity forumes...
https://github.com/teogramm/koha-docker/blob/main/config-main.env


This brings me to the next area with unraid and docker compose.

the .env or envrioment file. (this species setting across the docker stack.)

image.png.0a611ccdef79679476142f62009eb97d.png

 

env file:

# === Shared DB Credentials ===
MYSQL_SERVER=172.18.0.11
DB_NAME=koha_teolib
MYSQL_USER=koha_teolib
MYSQL_PASSWORD=Koha_DB_Password-SetME

# === MariaDB Root Credentials ===
MARIADB_ROOT_PASSWORD=Database_Root_Admin_Passwowrd-SetME

# === Koha Options ===
KOHA_LANGS=en
ZEBRA_MARC_FORMAT=marc21

# Elasticsearch options
# If the USE_ELASTICSEARCH variable is set the
# container is set yp to use Elasticsearch. A
# Zebra server is spawned inside the container,
# otherwise.
#USE_ELASTICSEARCH=true
#ELASTICSEARCH_HOST=
#OVERRIDE_SYSPREF_SearchEngine=Elasticsearch

# === Caching and Messaging ===
MEMCACHED_SERVERS=172.18.0.13:11211
MB_HOST=172.18.0.12

 

to effectively use the env file we use placeholders...

Example Compose file: not the "$" this is a variable that gets passed into the docker...

services:
  koha:
    image: teogramm/koha:24.11
    container_name: koha
    hostname: koha
    ports:
      - 8080:8080
      - 8081:8081
    networks:
      koha-net:
        ipv4_address: 172.18.0.10
    cap_add:
      - DAC_READ_SEARCH
      - SYS_NICE
    environment:
      MYSQL_SERVER: ${MYSQL_SERVER}
      MYSQL_USER: ${MYSQL_USER}
      MYSQL_PASSWORD: ${MYSQL_PASSWORD}
      DB_NAME: ${DB_NAME}
      MEMCACHED_SERVERS: ${MEMCACHED_SERVERS}
      MB_HOST: ${MB_HOST}
      KOHA_LANGS: ${KOHA_LANGS}
      ZEBRA_MARC_FORMAT: ${ZEBRA_MARC_FORMAT}
    depends_on:
      - db
      - rabbitmq
      - memcached
    labels:
      net.unraid.docker.webui: http://[IP]:[PORT:8081]
      net.unraid.docker.icon: "https://www.icetechnologies.lk/wp-content/uploads/2022/05/koha-library.png"
      folder.view: koha-docker
      net.unraid.docker.managed: 'composeman'

  rabbitmq:
    image: rabbitmq:3
    container_name: rabbitmq
    hostname: rabbitmq
    volumes:
      - /mnt/user/appdata/koha-docker/data/rabbitmq_plugins/enabled_plugins:/etc/rabbitmq/enabled_plugins
    networks:
      koha-net:
        ipv4_address: 172.18.0.12
    labels:
      folder.view: koha-docker
      net.unraid.docker.managed: 'composeman'

  db:
    image: mariadb:11
    container_name: mariadb-koha
    hostname: db
    volumes:
      - mariadb-koha:/var/lib/mysql
    environment:
      MARIADB_ROOT_PASSWORD: ${MARIADB_ROOT_PASSWORD}
      MARIADB_DATABASE: ${DB_NAME}
      MARIADB_USER: ${MYSQL_USER}
      MARIADB_PASSWORD: ${MYSQL_PASSWORD}
    networks:
      koha-net:
        ipv4_address: 172.18.0.11
    labels:
      folder.view: koha-docker
      net.unraid.docker.icon: 'https://github.com/mgutt/unraid-docker-templates/raw/main/mgutt/images/mariadb.png'
      net.unraid.docker.managed: 'composeman'

  memcached:
    image: memcached
    container_name: memcached
    hostname: memcached
    networks:
      koha-net:
        ipv4_address: 172.18.0.13
    labels:
      folder.view: koha-docker
      net.unraid.docker.managed: 'composeman'

volumes:
  mariadb-koha:
    driver: local
    driver_opts:
      type: none
      device: /mnt/user/appdata/koha-docker/data/mariadb
      o: bind

networks:
  koha-net:
    driver: bridge
    ipam:
      config:
        - subnet: 172.18.0.0/16
          gateway: 172.18.0.1

 

I've decided to set static ip docker bridge IP since we are setting the docker network up into the compose file...

I've also added pictures to each docker to make unraid look nicer...

 

image.thumb.png.3609c5293e4d01ba74bbdf9d0bd8a3fc.png

 

image.thumb.png.e48e8336ba64059ca923fa032ff4f903.png

 

good luck.

  • Community Expert

I mention going env file due to the koha docker uses the gitlab found here to make:
https://gitlab.com/koha-community/docker/koha-docker


Following the docs here:

https://koha-community.org/manual/22.05/en/html/installation.html


We may need to add additional docker envs

https://gitlab.com/koha-community/docker/koha-docker/-/raw/main/env/defaults.env?ref_type=heads

 

such as the username and password for koha.

example add to .env file edit stack env file
add

KOHA_PASS=koha
KOHA_USER=koha


so the env file will become:
 

# === MariaDB Configuration ===
MARIADB_ROOT_PASSWORD=P@ssw0rd
MARIADB_DATABASE=koha_teolib
MARIADB_USER=koha_teolib
MARIADB_PASSWORD=Koha_password

# === Koha Database Connection (STATIC IPs) ===
MYSQL_SERVER=172.18.0.11
DB_NAME=koha_teolib# === Shared DB Credentials ===
MYSQL_SERVER=172.18.0.11
DB_NAME=koha_teolib
MYSQL_USER=koha_teolib
MYSQL_PASSWORD=Koha_DB_Password-SetME

# === MariaDB Root Credentials ===
MARIADB_ROOT_PASSWORD=Database_Root_Admin_Passwowrd-SetME

# === Koha Options ===
KOHA_PASS=koha
KOHA_USER=koha
KOHA_LANGS=en
ZEBRA_MARC_FORMAT=marc21

# Elasticsearch options
# If the USE_ELASTICSEARCH variable is set the
# container is set yp to use Elasticsearch. A
# Zebra server is spawned inside the container,
# otherwise.
#USE_ELASTICSEARCH=true
#ELASTICSEARCH_HOST=
#OVERRIDE_SYSPREF_SearchEngine=Elasticsearch

# === Caching and Messaging ===
MEMCACHED_SERVERS=172.18.0.13:11211
MB_HOST=172.18.0.12

MYSQL_USER=koha_teolib
MYSQL_PASSWORD=Koha_password

# === Koha Options ===
KOHA_LANGS=en
ZEBRA_MARC_FORMAT=marc21

# === Caching and Messaging (STATIC IPs) ===
MEMCACHED_SERVERS=172.18.0.13:11211
MB_HOST=172.18.0.12

 

as I'm not sure of koha pathing nor where the koha-conf.xml file exist to get the username to run the setup...

I'm not sure the username/password to setup and finish the install for koha.
nor if volume mounts are needed for the koha portion for the docker to save between builds, updates and configurations.

 

I hope this help you.

  • Community Expert

also we need the example file contents inteh touched file...

 

Quote
mkdir -p /mnt/user/appdata/koha-docker/data/
mkdir -p /mnt/user/appdata/koha-docker/data/mariadb
mkdir -p /mnt/user/appdata/koha-docker/data/rabbitmq_plugins
touch /mnt/user/appdata/koha-docker/data/rabbitmq_plugins/enabled_plugins
chmod 777 -R /mnt/user/appdata/koha-docker/
chown nobody:users -R /mnt/user/appdata/koha-docker/

 


the commands that should be ran our:
 

# Create necessary folders and plugin file
mkdir -p /mnt/user/appdata/koha-docker/data/mariadb
mkdir -p /mnt/user/appdata/koha-docker/data/rabbitmq_plugins

# Write the correct plugin list to the file (Erlang format)
echo "[rabbitmq_stomp]." > /mnt/user/appdata/koha-docker/data/rabbitmq_plugins/enabled_plugins

# Set correct permissions for Unraid
chmod 777 -R /mnt/user/appdata/koha-docker/
chown nobody:users -R /mnt/user/appdata/koha-docker/

 

  • Community Expert

so to recap to add adataionl to get moving forward more for others who may want to implement koha...

In unraid open web terminal and run the following commands...
 

#Gitclone the docker sytem we are using:
cd /mnt/user/appdata/
git clone https://github.com/teogramm/koha-docker.git
cd koha-docker/
ls

# Create necessary folders and plugin file
mkdir -p /mnt/user/appdata/koha-docker/data/mariadb
mkdir -p /mnt/user/appdata/koha-docker/data/rabbitmq_plugins

# Write the correct plugin list to the file (Erlang format)
echo "[rabbitmq_stomp]." > /mnt/user/appdata/koha-docker/data/rabbitmq_plugins/enabled_plugins

# Set correct permissions for Unraid
chmod 777 -R /mnt/user/appdata/koha-docker/
chown nobody:users -R /mnt/user/appdata/koha-docker/


make the stack point to correct folder as shown in pictures able...

paste in the updated unraid compose file.

services:
  koha:
    image: teogramm/koha:24.11
    container_name: koha
    hostname: koha
    ports:
      - 8080:8080
      - 8081:8081
    networks:
      koha-net:
        ipv4_address: 172.18.0.10
        aliases:
          - koha
    dns:
      - 172.18.0.1
      - 192.168.2.1
      - 8.8.8.8
    cap_add:
      - DAC_READ_SEARCH
      - SYS_NICE
    environment:
      MYSQL_SERVER: db
      MYSQL_USER: koha_teolib
      MYSQL_PASSWORD: KohaP@ss
      DB_NAME: koha_teolib
      MEMCACHED_SERVERS: memcached:11211
      MB_HOST: rabbitmq
      KOHA_LANGS: en
      ZEBRA_MARC_FORMAT: marc21
      USE_BACKEND: 1
      USE_APACHE2: 1
      USE_CRON: 1
      USE_Z3950: 1
    healthcheck:
      test: ["CMD-SHELL", "curl -s -f http://localhost:8081 || exit 1"]
      interval: 10s
      timeout: 5s
      retries: 10
      start_period: 60s
    depends_on:
      db:
        condition: service_healthy
      rabbitmq:
        condition: service_healthy
      memcached:
        condition: service_started
    labels:
      net.unraid.docker.webui: http://[IP]:[PORT:8081]
      net.unraid.docker.icon: "https://www.icetechnologies.lk/wp-content/uploads/2022/05/koha-library.png"
      folder.view: koha-docker
      net.unraid.docker.managed: 'composeman'

  rabbitmq:
    image: rabbitmq:3
    container_name: rabbitmq
    hostname: rabbitmq
    volumes:
      - /mnt/user/appdata/koha-docker/data/rabbitmq_plugins/enabled_plugins:/etc/rabbitmq/enabled_plugins
    networks:
      koha-net:
        ipv4_address: 172.18.0.12
        aliases:
          - rabbitmq
    dns:
      - 172.18.0.1
      - 192.168.2.1
      - 8.8.8.8
    healthcheck:
      test: ["CMD", "rabbitmq-diagnostics", "check_port_connectivity"]
      interval: 10s
      timeout: 5s
      retries: 10
      start_period: 10s
    labels:
      folder.view: koha-docker
      net.unraid.docker.managed: 'composeman'

  db:
    image: mariadb:11
    container_name: mariadb-koha
    hostname: db
    volumes:
      - mariadb-koha:/var/lib/mysql
    environment:
      MARIADB_ROOT_PASSWORD: P@ssw0rd
      MARIADB_DATABASE: koha_teolib
      MARIADB_USER: koha_teolib
      MARIADB_PASSWORD: KohaP@ss
    networks:
      koha-net:
        ipv4_address: 172.18.0.11
        aliases:
          - db
    dns:
      - 172.18.0.1
      - 192.168.2.1
      - 8.8.8.8
    healthcheck:
      test: ["CMD-SHELL", "[ -d /var/lib/mysql/koha_teolib ]"]
      interval: 10s
      timeout: 5s
      retries: 10
      start_period: 30s
    labels:
      folder.view: koha-docker
      net.unraid.docker.icon: 'https://github.com/mgutt/unraid-docker-templates/raw/main/mgutt/images/mariadb.png'
      net.unraid.docker.managed: 'composeman'

  memcached:
    image: memcached
    container_name: memcached
    hostname: memcached
    networks:
      koha-net:
        ipv4_address: 172.18.0.13
        aliases:
          - memcached
    dns:
      - 172.18.0.1
      - 192.168.2.1
      - 8.8.8.8
    labels:
      folder.view: koha-docker
      net.unraid.docker.managed: 'composeman'

volumes:
  mariadb-koha:
    driver: local
    driver_opts:
      type: none
      device: /mnt/user/appdata/koha-docker/data/mariadb
      o: bind

networks:
  koha-net:
    driver: bridge
    ipam:
      config:
        - subnet: 172.18.0.0/16
          gateway: 172.18.0.1

-Update and change your wanted passwords...


run the container. I've added health checks to make sure the docker runs and database are up before continuing...

go to the web ui whcih should be urnaid host IP at port 8081 and finish kohal setup
 

per compose file above the login will be:
image.png.dfa4b16aee5c743fe42d859de97e3a74.png

 

image.thumb.png.db16d5344b50246279f56f42f851c1b3.png

 

some and most are already in the docker image and compose has already set the settings:
image.thumb.png.6ce1e70d2eea22dafaddc7e4573abe82.png

 

image.png.58b32f5523e2591a223ecd51deb0f825.png

 

image.thumb.png.2f6bedccfc9f189188cc132f870341af.png

 

filling out your otpions wanted..

I'm leaving defualts as this is proff of concempt and updated compose to assit in a easer transation and run on unraid.

image.thumb.png.cf95ecb18d1e3ea9ef53573d19210d56.png


the last of the installer to finish the build:
image.thumb.png.70cc44573e7f9be771e53431edc6a99d.png

 

at this point you should be good to go as koha is function and working...
image.thumb.png.fca59db426825f1664b04366c7d847bb.png

 

  • Community Expert

as by the time your at the library inputs your port 8080 is avilable for your patrons.

image.thumb.png.5724730488572c4c27c5bb0c5e971ea6.png

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.