Skip to content

Latest commit

Β 

History

History
139 lines (87 loc) Β· 3.56 KB

File metadata and controls

139 lines (87 loc) Β· 3.56 KB

Simplicate Docker Monorepo

This repo provides:

  • Production-ready base images for Python FastAPI and PHP-FPM

  • A unified Makefile for local build/test/push workflows

  • GitHub Actions pipelines for develop vs main branch builds

  • A library of compose.yaml configs for quickly bootstrapping supporting services


πŸ“¦ Images

1. Python FastAPI

Located in: images/docker-python-fastapi

  • Based on Python 3.13-slim
  • Includes:
    • FastAPI + Uvicorn
    • OpenAI, LangChain, Meilisearch, MinIO
    • NLP libraries (spacy, tiktoken, unstructured)
    • File parsing libraries (PyPDF2, pdfplumber, python-docx, openpyxl, pandas, etc.)
    • Media processing (ffmpeg, moviepy, pydub, vosk)
    • CLI tools: mc (MinIO client), jq, yq, curl, wget, nano
  • Intended as a general-purpose base image for Python APIs and helper services.

2. PHP-FPM (Craft CMS)

Located in: images/docker-php-fpm

  • Based on php:8.3-fpm
  • Includes:
    • Common PHP extensions (gd, intl, ldap, imap, zip, opcache, soap, xsl, etc.)
    • PECL extensions (xdebug, redis, imagick, xmlrpc)
  • Optimized for Craft CMS and other PHP web apps.

πŸ›  Build & Run

A single Makefile at the project root provides commands to build, run, and push either image.

Environment

  • IMAGE β†’ target image (python-fastapi or php-fpm)
  • VERSION β†’ tag version (dev, 1.0.0, etc.)

Commands

Build

Builds the image locally

make build IMAGE=python-fastapi VERSION=dev

Run

Runs the container locally, exposing port 8000 for FastAPI (or PHP-FPM defaults).

make run IMAGE=python-fastapi VERSION=dev

Shell

Opens an interactive shell inside the container.

make shell IMAGE=php-fpm VERSION=dev

Push to Docker Hub

Pushes the built image to Docker Hub under both :1.0.0 and :latest.

make push IMAGE=python-fastapi VERSION=1.0.0

Test Build

Runs a build and lists the resulting images.

make test-build IMAGE=python-fastapi

GitHub Develop Trigger

Commits and pushes to the develop branch, triggering a CI build (test only).

make push-develop IMAGE=python-fastapi

πŸš€ CI/CD

develop branch β†’ performs a test build (does not push to Docker Hub).

main branch β†’ performs a full build, tags images with latest and commit SHA, and pushes to Docker Hub.

Images are built for multiple platforms: linux/amd64 and linux/arm64.

πŸ—‚ Containers Directory

The containers/ folder contains a curated set of compose.yaml files for quickly spinning up commonly used services.

Current services:

  • meilisearch β†’ Lightning-fast, open-source search engine with a developer-friendly API.
  • miniflux β†’ Minimalist, self-hosted RSS reader with APIs and integrations.
  • minio β†’ S3-compatible object storage, great for local or production use.
  • n8n β†’ Workflow automation platform, similar to Zapier, but self-hosted.
  • plausible β†’ Lightweight, privacy-friendly web analytics alternative to Google Analytics.
  • wallabag β†’ Self-hosted β€œread-it-later” app for saving and archiving articles.

Usage

Each folder contains a compose.yaml file. To run any service:

docker compose -f containers/<service>/compose.yaml up -d

πŸ”‘ Secrets

GitHub Actions workflows require the following secrets set at the repo level:

DOCKERHUB_USERNAME β†’ your Docker Hub username (simplicateca)

DOCKERHUB_TOKEN β†’ a Docker Hub access token with push permissions