Skip to main content

On This Page

Building a Zero-Touch B2B SaaS for Open Journal Systems on AWS

3 min read
Share

These articles are AI-generated summaries. Please check the original sources for full details.

From Infrastructure to Product: Pipelines into a Profitable SaaS

Open Journal Systems (OJS) is the engine behind thousands of scientific publications, yet many institutions lack the IT resources to manage its complex PHP monolith. This architecture transforms OJS into a Zero-Touch B2B SaaS platform using AWS Fargate to eliminate manual server management and maximize profit margins.

Why This Matters

The transition from hosting to a true SaaS product requires moving beyond local server disks to a 100% managed, stateless topology. In the educational sector, the technical reality of managing PHP monoliths often clashes with the ideal of low-touch publishing, making automated provisioning and FinOps strategies like Fargate Spot essential for reducing operational costs by up to 70%.

Key Insights

  • Zero-Touch Provisioning: A Golang API listens for Stripe webhooks to trigger GitHub Actions, automating infrastructure deployment in minutes (Rapôso, 2026).
  • Stateless Persistence Architecture: OJS requires a persistent directory for PDFs, which is managed by mounting Amazon EFS directly to ECS Tasks via NFS (Rapôso, 2026).
  • FinOps Cost Optimization: Using Fargate Spot for non-production tiers can reduce compute costs by 70%, while Graviton-based RDS instances offer superior price-performance (Rapôso, 2026).
  • Regional Data Compliance: Codifying infrastructure with Terraform allows for dynamic region injection (e.g., eu-central-1 for GDPR) to meet global data privacy laws (Rapôso, 2026).
  • Automated Lifecycle Management: Amazon EventBridge and Lambda are used to scale environments to zero during non-business hours to further optimize expenditure (Rapôso, 2026).

Working Examples

Dockerizing OJS with required PHP extensions and optimizations for AWS environments.

FROM php:8.2-apache
RUN apt-get update && apt-get install -y \
libpng-dev libjpeg-dev libxml2-dev libzip-dev zlib1g-dev libicu-dev g++ \
&& docker-php-ext-configure gd --with-jpeg \
&& docker-php-ext-install gd mysqli opcache zip intl gettext
RUN { \
echo 'opcache.memory_consumption=128'; \
echo 'upload_max_filesize=64M'; \
echo 'post_max_size=64M'; \
} > /usr/local/etc/php/conf.d/ojs-optimization.ini
COPY . /var/www/html/
RUN chown -R www-data:www-data /var/www/html/

Terraform snippet connecting ECS Fargate tasks to EFS for persistent PDF storage.

resource "aws_ecs_task_definition" "ojs_task" {
  family = "ojs-app-${var.environment}"
  requires_compatibilities = ["FARGATE"]
  network_mode = "awsvpc"
  cpu = var.fargate_cpu
  memory = var.fargate_memory
  container_definitions = jsonencode([{
    name = "ojs-container"
    image = var.ecr_image_url
    mountPoints = [{
      sourceVolume = "ojs-efs-volume"
      containerPath = "/var/www/ojsdata"
    }]
  }])
  volume {
    name = "ojs-efs-volume"
    efs_volume_configuration {
      file_system_id = aws_efs_file_system.ojs_files.id
      transit_encryption = "ENABLED"
    }
  }
}

Practical Applications

  • Use Case: High schools running science fair journals utilize shared RDS instances and Fargate Spot to minimize costs. Pitfall: Failing to scale to zero during holidays results in unnecessary billing for idle resources.
  • Use Case: Medical universities requiring HIPAA-compliant hosting deploy isolated RDS instances via regional Terraform variables. Pitfall: Storing article PDFs on local container storage causes data loss when Fargate tasks recycle.
  • Use Case: Global academic publishers automate tenant creation via GitHub Actions and Route53 for instant domain mapping. Pitfall: Manual DNS management creates bottlenecks that break the zero-touch product strategy.

References:

Continue reading

Next article

GLM-5 Achieves Open-Source Leadership Without NVIDIA GPUs

Related Content