Created
April 9, 2026 16:30
-
-
Save pgwillia/d2256a85a7ac372dbde4a112c3b46c37 to your computer and use it in GitHub Desktop.
Getting familiar with Omeka installation/upgrade
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Omeka .htaccess: Apache configuration file | |
| # This file is required for Omeka to function correctly. | |
| # --------------- # | |
| # Error Reporting # | |
| # --------------- # | |
| # Uncomment the SetEnv line below to turn on detailed on-screen error | |
| # reporting. | |
| # | |
| # Note: This should only be enabled for development or debugging. Keep this | |
| # line commented for production sites. | |
| # | |
| SetEnv APPLICATION_ENV development | |
| # ------------- # | |
| # Rewrite Rules # | |
| # ------------- # | |
| RewriteEngine on | |
| # If you know mod_rewrite is enabled, but you are still getting mod_rewrite | |
| # errors, uncomment the line below and replace "/" with your base directory. | |
| # | |
| # RewriteBase / | |
| # Allow direct access to files (except PHP files) | |
| RewriteCond %{REQUEST_FILENAME} -f | |
| RewriteRule !\.(php[0-9]?|phtml|phps)$ - [C] | |
| RewriteRule .* - [L] | |
| RewriteRule ^install/.*$ install/install.php [L] | |
| RewriteRule ^admin/.*$ admin/index.php [L] | |
| RewriteRule .* index.php | |
| # -------------- # | |
| # Access Control # | |
| # -------------- # | |
| # Block access to all .ini files. | |
| <FilesMatch "\.ini$"> | |
| <IfModule mod_authz_core.c> | |
| Require all denied | |
| </IfModule> | |
| <IfModule !mod_authz_core.c> | |
| Order Allow,Deny | |
| Deny from all | |
| </IfModule> | |
| </FilesMatch> | |
| # --------# | |
| # Caching # | |
| # --------# | |
| # Uncomment the lines below in order to enable caching of some files | |
| # (after a finished site has gone live) | |
| # | |
| # <IfModule mod_expires.c> | |
| # ExpiresActive on | |
| # ExpiresDefault "access plus 10 day" | |
| # </FilesMatch> | |
| # </IfModule> | |
| # ------------ # | |
| # PHP Settings # | |
| # ------------ # | |
| <IfModule mod_php5.c> | |
| php_flag register_globals off | |
| php_flag magic_quotes_gpc off | |
| </IfModule> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [database] | |
| host = "db" | |
| username = "omeka" | |
| password = "omeka123" | |
| dbname = "omeka" | |
| prefix = "omeka_" | |
| charset = "utf8" | |
| ; Omeka ImageMagick configuration | |
| derivative_convert_path = "/usr/bin/" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| services: | |
| omeka: | |
| build: . | |
| container_name: omeka-classic | |
| ports: | |
| - "8080:80" | |
| volumes: | |
| # - ./omeka_files:/var/www/html/files | |
| # - ./omeka_plugins:/var/www/html/plugins | |
| # - ./omeka_themes:/var/www/html/themes | |
| - ./db.ini:/var/www/html/db.ini | |
| - ./.htaccess:/var/www/html/.htaccess | |
| depends_on: | |
| - db | |
| db: | |
| image: mariadb:10.5 | |
| container_name: omeka-db | |
| environment: | |
| MYSQL_ROOT_PASSWORD: rootpass | |
| MYSQL_DATABASE: omeka | |
| MYSQL_USER: omeka | |
| MYSQL_PASSWORD: omeka123 | |
| volumes: | |
| - db_data:/var/lib/mysql | |
| volumes: | |
| db_data: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM php:8.1-apache | |
| # Install system dependencies and PHP extensions | |
| RUN apt-get update && apt-get install -y \ | |
| unzip \ | |
| imagemagick \ | |
| libmagickwand-dev --no-install-recommends \ | |
| libjpeg-dev \ | |
| libpng-dev \ | |
| libfreetype6-dev \ | |
| libzip-dev \ | |
| && docker-php-ext-install mysqli pdo pdo_mysql exif gd zip \ | |
| && pecl install imagick \ | |
| && docker-php-ext-enable imagick exif gd zip | |
| # Enable Apache rewrite module | |
| RUN a2enmod rewrite | |
| # Set working directory | |
| WORKDIR /var/www/html | |
| # Download and extract Omeka Classic 3.1.2 | |
| ADD https://github.com/omeka/Omeka/releases/download/v3.1.2/omeka-3.1.2.zip /tmp/omeka.zip | |
| RUN unzip /tmp/omeka.zip -d /tmp \ | |
| && cp -a /tmp/omeka-3.1.2/. /var/www/html/ \ | |
| && rm -rf /tmp/* \ | |
| && chown -R www-data:www-data /var/www/html | |
| # Force Apache to honor .htaccess | |
| RUN echo '<Directory /var/www/html/>\n\ | |
| Options Indexes FollowSymLinks\n\ | |
| AllowOverride All\n\ | |
| Require all granted\n\ | |
| </Directory>' > /etc/apache2/conf-enabled/allow-override.conf | |
| EXPOSE 80 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment