Browse Source

Reorganizar el código dentro de este repo en vez de hacer otro

master
Siroco 2 months ago
parent
commit
e2ff9ecb9b
Signed by: siroco GPG Key ID: 1324098302A514B0
4 changed files with 194 additions and 0 deletions
  1. +85
    -0
      Dockerfile
  2. +82
    -0
      README.dockercompose.md
  3. +13
    -0
      docker-entrypoint.sh
  4. +14
    -0
      omeka.conf

+ 85
- 0
Dockerfile View File

@ -0,0 +1,85 @@
FROM registry.sindominio.net/debian as builder
# Install dependencies
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y git imagemagick wget unzip
RUN apt-get update && \
apt-get -qy install \
php-fpm php-mysql php-curl php-gd php-mbstring php-xml php-xmlrpc php-soap php-intl php-zip php-imagick\
ghostscript wget sudo curl openssl imagemagick\
poppler-utils && \
apt-get clean
RUN useradd omeka -d /sindominio/
COPY omeka.conf /etc/php/7.3/fpm/pool.d/www.conf
RUN mkdir /run/php/
RUN mkdir logs
# TODO: Change Policy for PDF convert - https://stackoverflow.com/questions/52998331/imagemagick-security-policy-pdf-blocking-conversion
RUN curl -sL https://deb.nodesource.com/setup_14.x -o nodesource_setup.sh
RUN bash nodesource_setup.sh
RUN apt-get install -y nodejs
# Install omeka
WORKDIR sindominio
RUN chown omeka:omeka /sindominio
USER omeka
RUN git clone --recursive https://github.com/omeka/omeka-s.git
RUN chmod 775 omeka-s
WORKDIR /sindominio/omeka-s
RUN npm install
RUN npx gulp init
# Install modules Nov 2020
# oai pmh module
RUN wget https://github.com/Daniel-KM/Omeka-S-module-OaiPmhRepository/releases/download/3.3.5/OaiPmhRepository-3.3.5.zip -O /tmp/oaipmh.zip
RUN unzip /tmp/oaipmh.zip -d modules/
# import from omeka 2
RUN wget https://github.com/omeka-s-modules/Omeka2Importer/releases/download/v1.4.0/Omeka2Importer-1.4.0.zip -O /tmp/importer.zip
RUN unzip /tmp/importer.zip -d modules/
# bulk edition
RUN wget https://github.com/Daniel-KM/Omeka-S-module-BulkEdit/releases/download/3.3.12.4/BulkEdit-3.3.12.4.zip -O /tmp/bulkedit.zip
RUN unzip /tmp/bulkedit.zip -d modules/
# custom vocab
RUN wget https://github.com/omeka-s-modules/CustomVocab/releases/download/v1.3.1/CustomVocab-1.3.1.zip -O /tmp/customvocab.zip
RUN unzip /tmp/customvocab.zip -d modules/
# extract pdf content to text field
RUN wget https://github.com/omeka-s-modules/ExtractText/releases/download/v1.2.0/ExtractText-1.2.0.zip -O /tmp/extract.zip
RUN unzip /tmp/extract.zip -d modules/
# metadata links
RUN wget https://github.com/omeka-s-modules/MetadataBrowse/releases/download/v1.4.0/MetadataBrowse-1.4.0.zip -O /tmp/metadata.zip
RUN unzip /tmp/metadata.zip -d modules/
# TODO: bulk check - https://gitlab.com/Daniel-KM/Omeka-S-module-BulkCheck - depend Logs & Generic
RUN rm -rf /tmp/*.zip
USER root
RUN apt-get purge -qy nodejs git curl wget openssl
RUN apt-get -qy clean
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
EXPOSE 9000
VOLUME /sindominio/
ENTRYPOINT ["/bin/bash","/usr/local/bin/docker-entrypoint.sh"]
CMD ["/usr/sbin/php-fpm7.3","--nodaemonize"]]

+ 82
- 0
README.dockercompose.md View File

@ -0,0 +1,82 @@
# Omeka S - Sindominio.net
Versión adaptada para la integración de __Omeka S__ en la infraestructura de _Sindominio_
Desarrollada para su uso en el repositorio _Hacer Laboratorio_ disponible en https://hacerlaboratorio.sindominio.net
Basada en tres imagenes Docker publicadas en el registry de Sindominio
* MariaDB: Base de datos
* PHPFPM: Código de Omeka S ejecutable a través de PHP FPM 7
* NGINX: Servidor web para acceder como proxy a PHPFPM y a los archivos no PHP de la aplicación de _Omeka S_
# Configuración
Configurar correctamente las variables de la base de datos _MYSQL_ y los volumenes.
Por defecto, los volúmenes se cargan en el espacio por defecto de Docker.
# Ejemplo Docker Compose
```
version: '3'
networks:
omekan:
external: false
volumes:
db:
data:
services:
db:
image: registry.sindominio.net/mariadb
#build: ./mariadb
container_name: db
networks:
- omekan
volumes:
- db:/var/lib/mysql
environment:
MYSQL_DATABASE: omeka_sd
MYSQL_USER: omeka_sd
MYSQL_PASSWORD: omeka_sd
phpfpm:
image: registry.sindominio.net/php-omeka-s
#build: ./php-omeka-s
container_name: phpfpm
networks:
- omekan
links:
- db
volumes:
- data:/sindominio
environment:
MYSQL_DATABASE: omeka_sd
MYSQL_USER: omeka_sd
MYSQL_PASSWORD: omeka_sd
MYSQL_HOST: db
nginx:
image: registry.sindominio.net/nginx-omeka-s
#build: "./nginx-omeka-s/"
container_name: nginx
restart: always
depends_on:
- phpfpm
networks:
- omekan
links:
- phpfpm
ports:
- "8090:80"
volumes:
- data:/sindominio
```

+ 13
- 0
docker-entrypoint.sh View File

@ -0,0 +1,13 @@
#!/bin/bash
# CONFIGURE DATABASE
set -e;
if [[ -z "$MYSQL_USER" ]]; then MYSQL_USER="omeka"; fi
if [[ -z "$MYSQL_PASSWORD" ]]; then MYSQL_PASSWORD="omeka"; fi
if [[ -z "$MYSQL_DATABASE" ]]; then MYSQL_DATABASE="omeka"; fi
if [[ -z "$MYSQL_HOST" ]]; then MYSQL_HOST="db"; fi
printf 'user = "%s"\npassword = "%s"\ndbname = "%s"\nhost = "%s"\n' $MYSQL_USER $MYSQL_PASSWORD $MYSQL_DATABASE $MYSQL_HOST > /sindominio/omeka-s/config/database.ini
exec "$@"

+ 14
- 0
omeka.conf View File

@ -0,0 +1,14 @@
[omeka]
user = omeka
group = omeka
listen = 9000
listen.owner = omeka
listen.group = omeka
pm = dynamic
pm.max_children = 5
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3

Loading…
Cancel
Save