Skip to content

Commit

Permalink
Merge pull request #3 from tulibraries/Modules_themes_files
Browse files Browse the repository at this point in the history
Modules themes files
  • Loading branch information
dkinzer authored Aug 27, 2021
2 parents e161e3a + 4e3e4d1 commit 3a3a140
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 74 deletions.
63 changes: 32 additions & 31 deletions .docker/app/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@ FROM php:7.4-apache-buster
# Previous maintainers: Oldrich Vykydal (o1da) - Klokan Technologies GmbH / Eric Dodemont <eric.dodemont@skynet.be>
# MAINTAINER Giorgio Comai <g@giorgiocomai.eu>

RUN a2enmod rewrite

ENV DEBIAN_FRONTEND noninteractive
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN apt-get -qq update \

WORKDIR /build

COPY . .

RUN a2enmod rewrite \
&& apt-get -qq update \
&& apt-get -qq -y --no-install-recommends install \
unzip=6.0-23+deb10u2 \
libfreetype6-dev=2.9.1-3+deb10u2 \
Expand All @@ -25,37 +29,34 @@ RUN apt-get -qq update \
poppler-utils=0.71.0-5 \
&& docker-php-ext-configure gd --with-jpeg=/usr/include/ --with-freetype=/usr/include/ \
&& docker-php-ext-install -j"$(nproc)" iconv pdo pdo_mysql mysqli gd \
&& yes | pecl install mcrypt-1.0.3 && docker-php-ext-enable mcrypt && yes | pecl install imagick && docker-php-ext-enable imagick \
&& yes | pecl install mcrypt-1.0.3 || echo "pecl install encrypt: $?" \
&& docker-php-ext-enable mcrypt || echo "docker-pop-ext-enable mcrypt: $?" \
&& yes | pecl install imagick || echo "pecl install imagick $?" && docker-php-ext-enable imagick \
&& wget --no-verbose "https://github.com/omeka/omeka-s/releases/download/v3.0.2/omeka-s-3.0.2.zip" -O /var/www/latest_omeka_s.zip \
&& unzip -q /var/www/latest_omeka_s.zip -d /var/www/ \
&& rm /var/www/latest_omeka_s.zip \
&& rm -rf /var/www/html/ \
&& mv /var/www/omeka-s/ /var/www/html/

COPY ./imagemagick-policy.xml /etc/ImageMagick-6/policy.xml
COPY ./.htaccess /var/www/html/.htaccess

# Create one volume for files, config, themes and modules
RUN mkdir -p /var/www/html/volume/config/ && mkdir -p /var/www/html/volume/files/ && mkdir -p /var/www/html/volume/modules/ && mkdir -p /var/www/html/volume/themes/

COPY ./database.ini /var/www/html/volume/config/
COPY ./local.config.php /var/www/html/volume/config/
RUN rm /var/www/html/config/database.ini \
&& ln -s /var/www/html/volume/config/database.ini /var/www/html/config/database.ini \
&& rm /var/www/html/config/local.config.php \
&& ln -s /var/www/html/volume/config/local.config.php /var/www/html/config/local.config.php \
&& rm -Rf /var/www/html/files/ \
&& ln -s /var/www/html/volume/files/ /var/www/html/files \
&& rm -Rf /var/www/html/modules/ \
&& ln -s /var/www/html/volume/modules/ /var/www/html/modules \
&& rm -Rf /var/www/html/themes/ \
&& ln -s /var/www/html/volume/themes/ /var/www/html/themes \
&& chown -R www-data:www-data /var/www/html/ \
&& chmod 600 /var/www/html/volume/config/database.ini \
&& chmod 600 /var/www/html/volume/config/local.config.php \
&& chmod 600 /var/www/html/.htaccess \
%% echo "ServerName localhost" >> /etc/apache2/apache2.conf

VOLUME /var/www/html/volume/
&& mv /var/www/omeka-s/ /var/www/html/ \
&& mkdir -p /var/www/html/config/ && mkdir -p /var/www/html/files/ && mkdir -p /var/www/html/modules/ && mkdir -p /var/www/html/themes/ \
&& cp imagemagick-policy.xml /etc/ImageMagick-6/policy.xml \
&& cp .htaccess /var/www/html/.htaccess \
&& cp database.ini /var/www/html/config/ \
&& cp local.config.php /var/www/html/config/ \
&& wget --no-verbose "https://github.com/omeka-s-modules/Mapping/releases/download/v1.4.1/Mapping-1.4.1.zip" && unzip Mapping-1.4.1.zip -d /var/www/html/modules/ \
&& wget --no-verbose "https://github.com/Daniel-KM/Omeka-S-module-OaiPmhRepository/releases/download/3.3.5.4/OaiPmhRepository-3.3.5.4.zip" && unzip OaiPmhRepository-3.3.5.4.zip -d /var/www/html/modules/ \
&& wget --no-verbose "https://github.com/Daniel-KM/Omeka-S-module-ImageServer/releases/download/3.6.7.3/ImageServer-3.6.7.3.zip" && unzip ImageServer-3.6.7.3.zip -d /var/www/html/modules/ \
&& wget --no-verbose "https://github.com/Daniel-KM/Omeka-S-module-IiifServer/releases/download/3.6.5.3/IiifServer-3.6.5.3.zip" && unzip IiifServer-3.6.5.3.zip -d /var/www/html/modules/ \
&& wget --no-verbose "https://github.com/omeka-s-modules/CSVImport/releases/download/v2.2.1/CSVImport-2.2.1.zip" && unzip CSVImport-2.2.1.zip -d /var/www/html/modules/ \
&& wget --no-verbose "https://github.com/Daniel-KM/Omeka-S-module-BulkEdit/releases/download/3.3.12.4/BulkEdit-3.3.12.4.zip" && unzip BulkEdit-3.3.12.4.zip -d /var/www/html/modules/ \
&& wget --no-verbose "https://github.com/zerocrates/AltText/releases/download/v1.2.1/AltText-1.2.1.zip" && unzip AltText-1.2.1.zip -d /var/www/html/modules/ \
&& wget --no-verbose "https://github.com/omeka-s-modules/CSSEditor/releases/download/v1.3.0/CSSEditor-1.3.0.zip" && unzip CSSEditor-1.3.0.zip -d /var/www/html/modules/ \
&& chown -R www-data:www-data /var/www/html/ \
&& chmod 600 /var/www/html/config/database.ini \
&& chmod 600 /var/www/html/config/local.config.php \
&& chmod 600 /var/www/html/.htaccess \
&& echo "ServerName localhost" >> /etc/apache2/apache2.conf \
&& rm -rf /build

WORKDIR /var/www/html

CMD ["apache2-foreground"]
36 changes: 0 additions & 36 deletions .docker/app/Dockerfile-2017

This file was deleted.

9 changes: 9 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.DS_Store
.docker
.env
.git
.gitignore
Makefile
data
dbenv.sh
docker-compose.yml
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
COMPOSE_FILE=docker-compose.yml
COMPOSE_PROJECT_NAME=tul_omekadev
DOCKER_IMAGE_VERSION=0.0.2
DOCKER_IMAGE_VERSION=0.0.3
IMAGE="tulibraries/tul_omeka-s"
PROJECT_NAME=omeka-s
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ run_app:
run_dev:
@docker run --name=$(PROJECT_NAME)-dev -d -p 127.0.0.1:3000:3000/tcp \
$(DEFAULT_RUN_ARGS) \
--mount type=bind,source=$(shell basename $(CURDIR)),target=/app \
--mount type=bind,source=$(PWD),target=/app \
$(IMAGE):dev sleep infinity

run_db:
Expand All @@ -66,6 +66,7 @@ run_db:
-e MARIADB_DATABASE=omeka \
-e MARIADB_USER=omeka \
-e MARIADB_PASSWORD=omeka \
--mount type=bind,source=$(PWD)/data/db,target=/lib/mysql \
bitnami/mariadb:latest

shell_app:
Expand Down
7 changes: 2 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@ services:
- OMEKA_DB_PASSWORD
volumes:
- type: bind
source: ./modules/
target: /var/www/html/modules/
- type: bind
source: ./themes/custom/
target: /var/www/html/themes/custom/
source: ./volume
target: /var/www/html/volume
restart: always

Empty file added themes/.keep
Empty file.

0 comments on commit 3a3a140

Please sign in to comment.