Production-ready, multi-architecture (linux/amd64 and linux/arm64) Docker distribution for the World Bank Metadata Editor and its companion FastAPI Data Processing Service, published by Data Artifex for the NADA (National Data Archive) ecosystem.
| Image | Description | Base Platform |
|---|---|---|
dartfx/worldbank-metadata-editor | Web Application UI, REST API, and async background queue worker | PHP 8.2-FPM + Nginx + Supervisor (Debian Bookworm) |
dartfx/worldbank-metadata-editor-fastapi | Microdata conversion, summary statistics, and DuckDB timeseries service | Python 3.12-slim (Pyreadstat, Pandas, DuckDB, R haven) |
linux/amd64 (Intel/AMD) and linux/arm64 (Apple Silicon M-series, AWS Graviton).install/schema.mysql.sql) and sets up the administrator account and REST API key on first launch.cli/migrate latest) on every startup (AUTO_MIGRATE=true).X-API-KEY header authentication./index.php/api-documentation/editor.php index.php cli/worker/run), job heartbeats, data imports, and direct publishing to NADA catalogs..sav), Stata (.dta), and CSV files with weighted variable summaries, categorical frequencies, and DuckDB indicator time-series aggregations. ┌──────────────────────────────────────────────┐
│ dartfx/worldbank-metadata-editor │
│ Nginx + PHP 8.2-FPM (Bookworm) │
HTTP / REST API │ • Web UI (/index.php/editor, /auth) │
─────────────────►│ • REST API (/index.php/api/*, X-API-KEY) │
│ • Swagger OpenAPI UI (/api-documentation) │
└──────┬────────────────┬───────────────┬──────┘
│ │ │
│ MySQL 3306 │ HTTP 8000 │ Shared Volume
▼ ▼ ▼
┌──────────────┐ ┌──────────────┐ ┌─────────────────────────┐
│ db (:3306) │ │ fastapi │ │ editor_datafiles │
│ MySQL 8.0 │ │ Python 3.12 │ │ /var/www/metadata- │
│ (or MariaDB)│ │ Uvicorn/R/Py │ │ editor/editor/datafiles│
└──────▲───────┘ └──────▲───────┘ └────────────▲────────────┘
│ │ │
│ MySQL 3306 │ HTTP 8000 │ Shared Volume
┌──────┴────────────────┴──────────────────────┴──────┐
│ Background Queue Worker Container │
│ PHP 8.2 CLI (`php index.php cli/worker/run`) │
│ • Async job queue processor & heartbeat monitor │
└─────────────────────────────────────────────────────┘
Create a docker-compose.yml file:
services:
db:
image: mysql:8.0
container_name: metadata-editor-db
restart: unless-stopped
command:
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_unicode_ci
- --default-authentication-plugin=mysql_native_password
- --max-allowed-packet=256M
environment:
MYSQL_ROOT_PASSWORD: root_password_here
MYSQL_DATABASE: metadata_editor
MYSQL_USER: editor_user
MYSQL_PASSWORD: editor_password_here
volumes:
- mysql_data:/var/lib/mysql
networks:
- metadata_net
healthcheck:
test: ["CMD-SHELL", "mysqladmin ping -h 127.0.0.1 -u$$MYSQL_USER -p$$MYSQL_PASSWORD --silent"]
interval: 10s
timeout: 5s
retries: 10
start_period: 30s
fastapi:
image: dartfx/worldbank-metadata-editor-fastapi:latest
container_name: metadata-editor-fastapi
restart: unless-stopped
environment:
STORAGE_PATH: /var/www/metadata-editor/editor/datafiles
HOST: 0.0.0.0
PORT: 8000
volumes:
- editor_datafiles:/var/www/metadata-editor/editor/datafiles
networks:
- metadata_net
healthcheck:
test: ["CMD-SHELL", "curl -fsS http://127.0.0.1:8000/status >/dev/null || exit 1"]
interval: 30s
timeout: 5s
retries: 3
start_period: 20s
editor:
image: dartfx/worldbank-metadata-editor:latest
container_name: metadata-editor-web
restart: unless-stopped
depends_on:
db:
condition: service_healthy
fastapi:
condition: service_healthy
ports:
- "8080:80"
environment:
DB_HOST: db
DB_PORT: 3306
DB_NAME: metadata_editor
DB_USER: editor_user
DB_PASSWORD: editor_password_here
EDITOR_STORAGE_PATH: /var/www/metadata-editor/editor/datafiles/editor
EDITOR_DATA_API_URL: http://fastapi:8000/
CLEAN_URLS: "true"
AUTO_INSTALL: "true"
AUTO_MIGRATE: "true"
ADMIN_EMAIL: [email protected]
ADMIN_PASSWORD: AdminPassword123!
ADMIN_API_KEY: your-secret-admin-api-key
APP_ENCRYPTION_KEY: ReplaceWithRandom32CharacterString!
volumes:
- editor_datafiles:/var/www/metadata-editor/editor/datafiles
- editor_files:/var/www/metadata-editor/editor/files
- editor_logs:/var/www/metadata-editor/editor/logs
networks:
- metadata_net
worker:
image: dartfx/worldbank-metadata-editor:latest
container_name: metadata-editor-worker
restart: unless-stopped
depends_on:
db:
condition: service_healthy
fastapi:
condition: service_healthy
command: ["php", "index.php", "cli/worker/run"]
environment:
DB_HOST: db
DB_PORT: 3306
DB_NAME: metadata_editor
DB_USER: editor_user
DB_PASSWORD: editor_password_here
EDITOR_STORAGE_PATH: /var/www/metadata-editor/editor/datafiles/editor
EDITOR_DATA_API_URL: http://fastapi:8000/
AUTO_INSTALL: "false"
AUTO_MIGRATE: "false"
volumes:
- editor_datafiles:/var/www/metadata-editor/editor/datafiles
- editor_files:/var/www/metadata-editor/editor/files
- editor_logs:/var/www/metadata-editor/editor/logs
networks:
- metadata_net
volumes:
mysql_data:
editor_datafiles:
editor_files:
editor_logs:
networks:
metadata_net:
driver: bridge
Start the stack:
docker compose up -d
| Service | URL / Port | Description |
|---|---|---|
| Metadata Editor Web UI | http://localhost:8080/ | Default login: [email protected] / AdminPassword123! |
| OpenAPI / Swagger Docs | http://localhost:8080/index.php/api-documentation/editor | Interactive API documentation |
| REST API Endpoint | http://localhost:8080/index.php/api | Authenticate using X-API-KEY header |
| FastAPI Health | http://localhost:8000/status (internal) | JSON health status |
| Variable | Default | Description |
|---|---|---|
APP_BASE_URL | (empty) | Fully qualified public URL (e.g. https://metadata.example.org/). |
APP_ENCRYPTION_KEY | (required) | 32+ character key for CodeIgniter cookie and session encryption. |
CLEAN_URLS | true | Removes /index.php/ from internal routing and generated URLs. |
COOKIE_SECURE | false | Set to true when terminating TLS/HTTPS in production. |
TRUSTED_PROXY_IPS | (empty) | Comma-separated reverse proxy IPs (Nginx, Traefik, ALB, Cloudflare). |
LOG_THRESHOLD | 1 | CodeIgniter log verbosity: 0=Off, 1=Error, 2=Debug, 3=Info. |
| Variable | Default | Description |
|---|---|---|
DB_HOST | db | Database hostname or IP. Compatible with MySQL 8.0+ and MariaDB 10.11+. |
DB_PORT | 3306 | MySQL port. |
DB_NAME | metadata_editor | Database schema name. |
DB_USER | editor_user | Database user. |
DB_PASSWORD | (required) | Database password. |
AUTO_INSTALL | true | Automatically imports schema and creates admin on first boot. |
AUTO_MIGRATE | true | Automatically executes pending migrations on startup. |
| Variable | Default | Description |
|---|---|---|
ADMIN_EMAIL | [email protected] | Initial administrator login email. |
ADMIN_PASSWORD | Admin@123456 | Initial administrator password. |
ADMIN_FIRST_NAME | Site | Admin first name. |
ADMIN_LAST_NAME | Administrator | Admin last name. |
ADMIN_API_KEY | (empty) | Optional initial X-API-KEY registered for the admin user. |
| Variable | Default | Description |
|---|---|---|
EDITOR_DATA_API_URL | http://fastapi:8000/ | URL where PHP connects to the FastAPI service. |
EDITOR_STORAGE_PATH | /var/www/metadata-editor/editor/datafiles/editor | Shared storage directory path. |
PHP_MEMORY_LIMIT | 512M | PHP memory limit (increase for massive survey projects). |
PHP_UPLOAD_MAX_FILESIZE | 2000M | Maximum single file upload size (default 2 GB). |
PHP_POST_MAX_SIZE | 2000M | Maximum total POST request payload size (default 2 GB). |
To avoid data loss across container recreations, persist the following container paths to Docker volumes or host mounts:
| Container Path | Purpose | Recommended Volume / Mount |
|---|---|---|
/var/lib/mysql | MySQL tables and InnoDB database transactions | mysql_data |
/var/www/metadata-editor/editor/datafiles | Uploaded survey microdata, schemas, and worker heartbeats | editor_datafiles (shared across editor, worker, fastapi) |
/var/www/metadata-editor/editor/files | Session data, user thumbnails, public assets, and captcha | editor_files |
/var/www/metadata-editor/editor/logs | CodeIgniter audit and application error logs | editor_logs |
Images are compiled and pushed for both architectures:
linux/amd64 (x86_64, standard cloud servers)linux/arm64 (aarch64, Apple Silicon M1-M4, AWS Graviton)Tags available:
latest: Tracks the newest stable release.v1.4.0 (and specific release tags): Pinned reproducible releases.staging: Automated staging builds for testing upcoming releases.Maintained by Data Artifex
Repository: https://github.com/DataArtifex/worldbank-metadata-editor-docker
Upstream World Bank Project: https://github.com/worldbank/metadata-editor
Support: [email protected]
License: MIT License (with World Bank IGO Rider)
docker pull dartfx/worldbank-metadata-editor:latest