Migrate from Docker Compose
Move an existing Docker Compose workload to Sealos by translating services, ports, storage, and environment variables into App Deploy and related Sealos products.
When to use this
Use this page when you already have a working Docker Compose setup and want to move that workload into Sealos.
This is not the default first deploy path. If you are starting from scratch, use First Deploy instead. If you are already running the app on Sealos and only need one follow-up change, use the manage task pages instead of a full migration flow.
Check for a ready-made template first
Before you do a manual migration, check whether Sealos App Store already has a maintained template for the workload you want to run.
If a tested template exists, start there. Manual migration is most useful when you have a custom app or when no template matches the services in your docker-compose.yml.
Translate Compose concepts into Sealos
Use this table to map the main Docker Compose concepts into Sealos building blocks:
| Docker Compose | Sealos target |
|---|---|
services | Separate app deployments or managed services |
ports | App Deploy network configuration |
volumes | Persistent Storage |
environment | Environment Variables |
depends_on | Deployment order and dependency planning |
image | Container image field in App Deploy |
command | Startup command or runtime command field |
Most migrations become easier if you split stateful services and app services instead of trying to force the entire stack into one first deploy.
Plan the migration
- Read the existing
docker-compose.ymland list every service, image, port, volume, environment variable, and startup command. - Decide which services should stay together in App Deploy and which should become a dedicated Sealos product such as a managed database.
- Identify every persistent path before you redeploy anything.
- Move external dependencies first so the application can connect to them when the app service starts.
Example: WordPress migration
A typical WordPress stack in Docker Compose has one app service and one database service.
In Sealos, a practical migration path is:
- Create the database first by using the Sealos database product that matches the Compose stack.
- Record the database host, username, password, and database name.
- Deploy the
wordpress:latestapp in App Deploy. - Expose port
80publicly so you can reach the site. - Attach persistent storage to
/var/www/htmlso uploads and content survive a redeploy. - Add the WordPress database settings as environment variables before the first app start.
That keeps the migration clear: stateful data is handled separately, while the web app moves into the App Deploy workflow.
Verify
Use this checklist before you call the migration complete:
- Every Docker Compose service has a clear Sealos target.
- Persistent data paths were moved to persistent storage where needed.
- The migrated app returns to
running. - The public endpoint opens the migrated workload successfully.
- The app can still reach the services it depended on before the migration.
If the migrated app does not reach running, see App Does Not Reach Running.
If the public endpoint does not open, see Public URL Does Not Open.
Related Tasks
- Persistent Storage if the original Compose stack used
volumes. - Environment Variables if the migrated app still needs runtime settings.
- Update and Redeploy if you need to adjust the migrated app after the first successful move.
Explore with AI
Get AI insights on this article
Share this article
Last updated on