Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

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 init to create schema and admin account
  • Start YunCMS container and verify /health and /ready endpoints
  • Use docker compose down to 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.

Source

Stop the service and create a verified backup with the current image.

Source

The stack does not consider YunCMS ready before MySQL becomes healthy.

Source

  • Record date: 2026-09-17T20:45:31.986Z