Updating documentation for OLD Article
First we need a docker image (i'm using a new one based on ubuntu yammy)
I'm using it in production with 25 libraries, 800k records , 4 collections and 3 diferents instances (postgresql, php 8.1).
# Created by @horaciodegiorgi @ dev.to
FROM ubuntu:jammy
#install all the dependencies
RUN apt-get update
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get install -y curl apache2 \
libapache2-mod-php \
php-pear \
php \
php-curl \
php-dev \
php-gd \
php-intl \
php-json \
php-ldap \
php-mbstring \
php-pgsql \
php-soap \
php-xml \
php-zip \
pkg-config \
apt-utils
##optional 1 set timezone
ENV TZ=America/Argentina/Mendoza
#optional 2 install of yaz lib for access z3950 servers
RUN apt-get install -y libyaz4-dev
RUN yes "" |pecl install yaz
RUN ln -s /usr/include/x86_64-linux-gnu/curl/ /usr/local/include/curl
# optional solr library for SIG
RUN apt-get install -y libcurl4-gnutls-dev
RUN yes "" |pecl install solr
# configure apache
EXPOSE 80
EXPOSE 443
COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer
COPY apache2-foreground /usr/bin/
RUN chmod +x /usr/bin/apache2-foreground
RUN a2enmod rewrite
CMD ["apache2-foreground"]
Create a image with
$ docker build -t vufindwebdocker .
For SOLR we need a image with java SDK . The eclipse-temurin:21 is working perfectly.
After download the 10 version of vufind from https://vufind.org
Now we need a docker-compose file.
version: '3.8'
services:
vufbpgsm:
tty: true
image: 'eclipse-temurin:21'
working_dir: /usr/local/vufind
restart: 'no'
user: '1000:1000'
volumes:
- './vufind/src:/usr/local/vufind'
container_name: vufbpgsm
environment:
- VUFIND_LOCAL_DIR=/usr/local/vufind
- VUFIND_LOCAL_DIR=/usr/local/vufind/local
- SOLR_JETTY_HOST=0.0.0.0
- SOLR_ADDITIONAL_START_OPTIONS=-f
ports:
- '8984:8983'
command: './solr.sh start '
vudindweb:
ports:
- '8111:80'
volumes:
- './html:/var/www/html'
- './scripts/000-default.conf:/etc/apache2/sites-available/000-default.conf'
- './vufind/src:/usr/local/vufind'
- './scripts:/usr/local/scripts'
- './phpini-override.ini:/etc/php/8.1/cli/conf.d/99-phpini-override.ini'
- './phpini-override.ini:/etc/php/8.1/apache2/conf.d/99-phpini-override.ini'
image: vufindwebdocker
The others files script like 000-default.conf and phpini-override.ini are in the github repo
Vufind-10-docker
Top comments (0)