first commit

This commit is contained in:
rnsrk 2025-04-16 14:45:28 +02:00
commit 7de7f00f88
2 changed files with 83 additions and 0 deletions

54
build/Dockerfile Normal file
View file

@ -0,0 +1,54 @@
FROM php:8.1-apache
ARG OMEKA_DB_NAME
ARG OMEKA_DB_USER
ARG OMEKA_DB_PASSWORD
ARG OMEKA_DB_HOST
# Install dependencies
RUN apt-get update && apt-get install -y \
git \
unzip \
libxml2-dev \
libpng-dev \
libjpeg-dev \
libfreetype6-dev \
libmagickwand-dev \
imagemagick \
nodejs \
npm \
libicu-dev \
&& rm -rf /var/lib/apt/lists/*
# Install PHP extensions
RUN docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install -j$(nproc) pdo pdo_mysql xml gd intl \
&& pecl install imagick \
&& docker-php-ext-enable imagick
# Enable Apache modules
RUN a2enmod rewrite
# Set the working directory
WORKDIR /var/www/html
# Clone Omeka S repository
RUN git clone https://github.com/omeka/omeka-s.git . \
&& git config --global --add safe.directory /var/www/html \
&& npm install \
&& npx gulp init
# Set directory permissions
RUN mkdir -p files && chown -R www-data:www-data files
RUN { \
echo "user = ${OMEKA_DB_USER}"; \
echo "password = ${OMEKA_DB_PASSWORD}"; \
echo "dbname = ${OMEKA_DB_NAME}"; \
echo "host = ${OMEKA_DB_HOST}"; \
echo "port = ''"; \
echo "unix_socket = ''"; \
echo "charset = ''"; \
} > /var/www/html/config/database.ini;
CMD ["apache2-foreground"]