Back to Projects

inception

A WordPress deployment with custom Docker images, HTTPS, and persistent storage.

  • Docker Compose
  • Shell
  • Makefile

Overview

Inception is a 42 infrastructure project that packages a WordPress site as three services managed by Docker Compose. I wrote a Dockerfile for each service using Alpine Linux as the base, along with shell scripts that initialize each service when its container starts.

Visit the repository for source and setup instructions.

What I Built

Details

Service boundaries and persistent data

The services communicate over a dedicated Docker bridge network. WordPress files and MariaDB data are stored in separate host-backed volumes so they survive container recreation. PHP-FPM can write to the WordPress volume, and NGINX mounts the same volume read-only to serve static files.

First startup and subsequent restarts

MariaDB bootstraps its database on a fresh volume. The WordPress startup script waits for MariaDB with a bounded retry loop, then checks for existing files, configuration, and accounts before creating them. Compose mounts passwords as file-backed secrets and reads settings such as the site domain and data path from an environment file.

Notes

Run make to build and start the stack after configuring the domain and local secret files. Use make status to check container state, make logs to follow output, and make down to stop the services while preserving data. The setup uses a self-signed certificate, so browsers display a certificate warning. The repository includes a user guide for setup and a developer guide that explains the request path and startup behavior.