Run YunCMS with Docker Compose: MySQL 8.4 Included
Description and use
Using Docker Compose, YunCMS can be quickly deployed with MySQL 8.4 in a single stack that includes all required services and persistent volumes. The process involves downloading compose files, configuring environment variables, initializing the database, starting containers, and verifying readiness via /health and /ready endpoints.
Problem
Setting up YunCMS locally or in production requires coordinating Node.js, npm, and a separate MySQL server, which is cumbersome for quick evaluation.
Outcome
The workflow delivers a reproducible, self‑contained YunCMS environment with persistent MySQL and CMS data, simplifying local evaluation and production deployment.
Workflow
- Create deployment directory and download compose files
- Edit .env with strong passwords and pin image version
- Start MySQL container and wait for healthy status
- Run
docker compose run --rm yuncms initto create schema and admin account - Start YunCMS container and verify
/healthand/readyendpoints - Use
docker compose downto stop services without deleting data - Create backups with
docker compose run --rm yuncms backup - Update image by changing YUNCMS_IMAGE, pulling new image, running
bootstrap, and restarting - Configure reverse proxy, TLS, and production settings before exposing to internet
Evidence
The YunCMS image also includes the MySQL client tools required by the backup and restore commands.
Stop the service and create a verified backup with the current image.
The stack does not consider YunCMS ready before MySQL becomes healthy.
- Record date: 2026-09-17T20:45:31.986Z