first commit
This commit is contained in:
commit
7de7f00f88
2 changed files with 83 additions and 0 deletions
54
build/Dockerfile
Normal file
54
build/Dockerfile
Normal 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"]
|
||||||
29
docker-compose.yml
Normal file
29
docker-compose.yml
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
services:
|
||||||
|
omeka:
|
||||||
|
build:
|
||||||
|
context: ./build/
|
||||||
|
args:
|
||||||
|
- OMEKA_DB_HOST=db
|
||||||
|
- OMEKA_DB_USER=omeka
|
||||||
|
- OMEKA_DB_PASSWORD=omeka
|
||||||
|
- OMEKA_DB_NAME=omeka
|
||||||
|
ports:
|
||||||
|
- 3020:80
|
||||||
|
volumes:
|
||||||
|
- omeka_data:/var/www/html/files
|
||||||
|
depends_on:
|
||||||
|
- db
|
||||||
|
|
||||||
|
db:
|
||||||
|
image: mariadb:11
|
||||||
|
environment:
|
||||||
|
- MYSQL_ROOT_PASSWORD=root
|
||||||
|
- MYSQL_DATABASE=omeka
|
||||||
|
- MYSQL_USER=omeka
|
||||||
|
- MYSQL_PASSWORD=omeka
|
||||||
|
volumes:
|
||||||
|
- db_data:/var/lib/mysql
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
omeka_data:
|
||||||
|
db_data:
|
||||||
Loading…
Add table
Add a link
Reference in a new issue