Deploy with Docker¶
Summary¶
Use this path when your team runs containerized environments with Docker Compose.
Outcome¶
After completing this guide, you should have a running SkyCMS deployment in Docker, first-time setup locked down, and basic edit and publish validation completed.
When to use Docker deployment¶
- you need local-to-test parity with container runtime behavior,
- you want fast environment spin-up for validation,
- you manage deployment lifecycle outside platform-native PaaS workflows.
Prerequisites¶
Before you begin, confirm:
- Docker Engine is running.
- Docker Compose is available.
- Database and storage credentials are prepared.
- Compose file and environment variable source are finalized.
If needed, review:
Deployment flow¶
flowchart TD
Config[Compose and env configuration] --> Start[Start containers]
Start --> Setup[Complete first-time setup]
Setup --> Lock[Disable setup mode]
Lock --> Verify[Run health and publish checks]
Required configuration values¶
At minimum, configure:
- ConnectionStrings__ApplicationDbContextConnection
- ConnectionStrings__StorageConnectionString
- AzureBlobStorageEndPoint
- CosmosPublisherUrl
- CosmosAllowSetup=true for first-time setup only
Steps¶
1. Start the stack¶
- Open the directory containing your compose file.
- Start the stack.
docker compose up -d
2. Complete first-time setup¶
- Open the editor URL.
- Navigate to /___setup.
- Complete setup and create admin credentials.
3. Lock setup mode and restart¶
- Set CosmosAllowSetup=false.
- Restart the stack.
docker compose up -d
Verification¶
Use these checks to confirm the deployment is healthy.
1. Confirm containers are running¶
- Confirm container status.
docker compose ps
2. Confirm the health endpoint responds¶
- Confirm health endpoint.
Invoke-WebRequest http://localhost:5000/___healthz
3. Confirm the publish path works¶
- Validate publish path:
- sign in,
- create a simple page,
- publish,
- verify rendered output and assets.
The deployment is working when containers remain healthy after setup mode is disabled, the health endpoint responds successfully, and a newly published page renders with its assets.
Troubleshooting quick checks¶
If setup or startup fails:
docker compose logs --tail 200
If publishing is stale:
- verify publisher URL,
- verify cache invalidation behavior.
If storage actions fail:
- verify storage connection values,
- verify storage credentials and permissions.
Upgrade flow¶
- Back up database and storage.
- Pull or build updated image.
- Roll out updated compose stack.
- Re-run smoke checks (login, edit, publish, health).