From d96117d30e81c23bae78e46be074ddf0c0d5965c Mon Sep 17 00:00:00 2001
From: Amirul78800 <130369162+Amirul78800@users.noreply.github.com>
Date: Mon, 25 May 2026 16:40:06 +0800
Subject: [PATCH 1/4] Create Dockerfile for Open Monograph Press setup
This Dockerfile sets up an environment for Open Monograph Press (OMP) using PHP 8.2 with necessary extensions, installs Composer, clones the OMP repository, and configures Apache.
---
Dockerfile | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 77 insertions(+)
create mode 100644 Dockerfile
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000000..df7bf05ef9
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,77 @@
+# ============================================================
+# Dockerfile untuk Open Monograph Press (OMP)
+# Repo: https://github.com/Amirul78800/omp
+# Deploy: TrueNAS SCALE via Arcane (Docker Compose)
+# ============================================================
+
+FROM php:8.2-apache
+
+# Install PHP extensions yang diperlukan OMP
+RUN apt-get update && apt-get install -y \
+ git \
+ unzip \
+ curl \
+ libpng-dev \
+ libjpeg-dev \
+ libfreetype6-dev \
+ libzip-dev \
+ libicu-dev \
+ libxml2-dev \
+ libonig-dev \
+ libxslt-dev \
+ && docker-php-ext-configure gd --with-freetype --with-jpeg \
+ && docker-php-ext-install \
+ gd \
+ pdo \
+ pdo_mysql \
+ mysqli \
+ zip \
+ intl \
+ xml \
+ mbstring \
+ bcmath \
+ opcache \
+ ftp \
+ && apt-get clean && rm -rf /var/lib/apt/lists/*
+
+# Install Composer
+COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
+
+# Set working directory
+WORKDIR /var/www/html
+
+# Clone repo OMP (dengan submodules)
+RUN git clone --recurse-submodules https://github.com/Amirul78800/omp.git . \
+ && git submodule update --init --recursive
+
+# Install PHP dependencies via Composer
+RUN composer install -d lib/pkp --no-dev --optimize-autoloader
+
+# Buat direktori yang diperlukan OMP
+RUN mkdir -p \
+ public/files \
+ cache/t_cache \
+ cache/t_config \
+ cache/t_compile \
+ cache/_db \
+ && chown -R www-data:www-data /var/www/html \
+ && chmod -R 755 /var/www/html \
+ && chmod -R 777 public/files cache
+
+# Copy config template
+RUN cp config.TEMPLATE.inc.php config.inc.php
+
+# Setup Apache - enable mod_rewrite
+RUN a2enmod rewrite
+
+# Apache config untuk OMP
+RUN echo '\n\
+ Options FollowSymLinks\n\
+ AllowOverride All\n\
+ Require all granted\n\
+' > /etc/apache2/conf-available/omp.conf \
+ && a2enconf omp
+
+EXPOSE 80
+
+CMD ["apache2-foreground"]
From 8d04daf39777e66d781f9310d515051837fd9055 Mon Sep 17 00:00:00 2001
From: Amirul78800 <130369162+Amirul78800@users.noreply.github.com>
Date: Mon, 25 May 2026 16:51:16 +0800
Subject: [PATCH 2/4] Add Docker build and push workflow
---
.github/workflows/docker-build.yml | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
create mode 100644 .github/workflows/docker-build.yml
diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml
new file mode 100644
index 0000000000..922b68d8de
--- /dev/null
+++ b/.github/workflows/docker-build.yml
@@ -0,0 +1,26 @@
+name: Build and Push OMP to Docker Hub
+
+on:
+ push:
+ branches: [ private1 ]
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ submodules: recursive # penting untuk OMP!
+
+ - name: Login to Docker Hub
+ uses: docker/login-action@v3
+ with:
+ username: ${{ secrets.DOCKERHUB_USERNAME }}
+ password: ${{ secrets.DOCKERHUB_TOKEN }}
+
+ - name: Build and Push
+ uses: docker/build-push-action@v5
+ with:
+ context: .
+ push: true
+ tags: amirul78800/omp:latest
From 9b2e986459deaa44f8c44969204cdae54ee9e721 Mon Sep 17 00:00:00 2001
From: Amirul78800 <130369162+Amirul78800@users.noreply.github.com>
Date: Wed, 27 May 2026 09:53:38 +0800
Subject: [PATCH 3/4] Add files via upload
---
Dockerfile | 34 +++++++++++++---------------------
1 file changed, 13 insertions(+), 21 deletions(-)
diff --git a/Dockerfile b/Dockerfile
index df7bf05ef9..3e31dfa1c4 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,14 +1,13 @@
# ============================================================
# Dockerfile untuk Open Monograph Press (OMP)
-# Repo: https://github.com/Amirul78800/omp
-# Deploy: TrueNAS SCALE via Arcane (Docker Compose)
+# CARA GUNA: GitHub Actions akan COPY kod ke dalam image
+# JANGAN clone dalam Dockerfile — guna COPY sahaja
# ============================================================
FROM php:8.2-apache
-# Install PHP extensions yang diperlukan OMP
+# Install dependencies
RUN apt-get update && apt-get install -y \
- git \
unzip \
curl \
libpng-dev \
@@ -18,7 +17,6 @@ RUN apt-get update && apt-get install -y \
libicu-dev \
libxml2-dev \
libonig-dev \
- libxslt-dev \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install \
gd \
@@ -40,38 +38,32 @@ COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
# Set working directory
WORKDIR /var/www/html
-# Clone repo OMP (dengan submodules)
-RUN git clone --recurse-submodules https://github.com/Amirul78800/omp.git . \
- && git submodule update --init --recursive
+# COPY kod dari GitHub Actions (bukan clone)
+COPY . .
-# Install PHP dependencies via Composer
-RUN composer install -d lib/pkp --no-dev --optimize-autoloader
+# Install PHP dependencies
+RUN composer install -d lib/pkp --no-dev --optimize-autoloader --no-interaction
-# Buat direktori yang diperlukan OMP
+# Buat direktori yang diperlukan
RUN mkdir -p \
- public/files \
cache/t_cache \
cache/t_config \
cache/t_compile \
cache/_db \
&& chown -R www-data:www-data /var/www/html \
&& chmod -R 755 /var/www/html \
- && chmod -R 777 public/files cache
+ && chmod -R 777 cache
-# Copy config template
-RUN cp config.TEMPLATE.inc.php config.inc.php
-
-# Setup Apache - enable mod_rewrite
+# Enable Apache mod_rewrite
RUN a2enmod rewrite
-# Apache config untuk OMP
-RUN echo '\n\
+# Apache config
+RUN printf '\n\
Options FollowSymLinks\n\
AllowOverride All\n\
Require all granted\n\
-' > /etc/apache2/conf-available/omp.conf \
+\n' > /etc/apache2/conf-available/omp.conf \
&& a2enconf omp
EXPOSE 80
-
CMD ["apache2-foreground"]
From 74b4e60cef7dcdcda6c4df01b5d01842e578f233 Mon Sep 17 00:00:00 2001
From: Amirul78800 <130369162+Amirul78800@users.noreply.github.com>
Date: Wed, 27 May 2026 10:02:39 +0800
Subject: [PATCH 4/4] Change Docker image tag to amirul123/omp
---
.github/workflows/docker-build.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml
index 922b68d8de..76a4f8f203 100644
--- a/.github/workflows/docker-build.yml
+++ b/.github/workflows/docker-build.yml
@@ -23,4 +23,4 @@ jobs:
with:
context: .
push: true
- tags: amirul78800/omp:latest
+ tags: amirul123/omp