Production-ready DevOps project for deploying a Flarum community forum on Oracle Cloud Infrastructure (OCI) Always Free Tier.
This project provisions and configures the complete infrastructure for a Flarum forum — fully automated, from bare metal to a running application.
Infrastructure as Code (Terraform) provisions OCI compute, networking, and security resources
Configuration Management (Ansible) handles OS-level setup, Docker, firewalld, and service orchestration
Containerized Application (Docker Compose) runs Flarum + MySQL as isolated services
CI/CD Pipeline (GitHub Actions) triggers deployment on every push to main
Always Free Tier cost optimization — zero infrastructure cost on OCI
┌─────────────────────────────────────────────────────────────┐
│ OCI Always Free Tier │
│ │
│ ┌─────────────────────────────────────────────────────────┐│
│ │ Public Subnet ││
│ │ ││
│ │ ┌───────────────────────────────────────────────────┐ ││
│ │ │ Flarum Web Server (VM.Standard.E2.1) │ ││
│ │ │ 1 OCPU / 1 GB RAM │ ││
│ │ │ │ ││
│ │ │ ┌──────────────┐ ┌──────────────────┐ │ ││
│ │ │ │ Flarum │◄─────────►│ MySQL │ │ ││
│ │ │ │ Container │ │ Container │ │ ││
│ │ │ └──────────────┘ └──────────────────┘ │ ││
│ │ └───────────────────────────────────────────────────┘ ││
│ └─────────────────────────────────────────────────────────┘│
└─────────────────────────────────────────────────────────────┘
Infrastructure & Orchestration
Category
Technology
Purpose
Cloud Provider
OCI Always Free Tier
Compute, networking, zero-cost hosting
IaC
Terraform (>= 1.0)
Declarative infrastructure provisioning
Provider
Oracle/OCI (~> 5.0)
Terraform provider for OCI resources
Config Management
Ansible (7.0)
Server configuration, service deployment
Category
Technology
Purpose
Runtime
Docker + Docker Compose
Container orchestration on the instance
App Image
mondedie/flarum:stable
Official Flarum community image
Database Image
mysql:8.0
MySQL with custom my.cnf tuning
Web Server
nginx:alpine
Reverse proxy (optional, TLS termination)
Category
Technology
Purpose
Forum
Flarum
PHP-based lightweight community forum
Database
MySQL 8.0
Data persistence with InnoDB
Search
MySQL Full-Text
Built-in search (no Elasticsearch dependency)
Category
Technology
Purpose
CI/CD Platform
GitHub Actions
Automated pipeline triggered on push/PR
Container Registry
GitHub Container Registry (ghcr.io)
Docker image storage
Build
Docker Buildx
Multi-architecture, cached builds
SSH
appleboy/ssh-action
Remote command execution for health checks
Linting
ansible-lint , yamllint
Playbook and YAML validation
Category
Technology
Purpose
Network Isolation
VCN + Subnets
Public/private subnet separation
Firewall
Security Lists + firewalld
Port-level access control
Authentication
SSH Key
Key-only instance access
TLS
Let's Encrypt / Certbot
Free SSL certificate automation
Secrets
GitHub Secrets
Encrypted credential storage
Category
Technology
Purpose
OS
Oracle Linux 8
OCI-optimized Linux distribution
Init
cloud-init / user_data
First-boot instance configuration
Package Manager
dnf
RPM-based package installation
.
├── terraform/ # Infrastructure as Code
│ ├── main.tf # VCN, subnets, compute, security
│ ├── variables.tf # Input variable declarations
│ ├── outputs.tf # Output values (IPs, URLs)
│ ├── user_data.sh # Web server cloud-init script
│ └── mysql_user_data.sh
├── ansible/ # Configuration Management
│ ├── playbook.yml # Server provisioning playbook
│ └── templates/ # Jinja2 templates (docker-compose, env, setup)
├── docker/ # Container Images
│ ├── flarum/ # Flarum Dockerfile + setup script
│ └── mysql/ # MySQL Dockerfile + custom config
├── .github/ # CI/CD
│ ├── workflows/ # GitHub Actions workflow definitions
│ └── SECRETS_SETUP.md # Detailed secrets configuration guide
└── README.md
MIT — see LICENSE for details.