Appearance
Moving from Docker Compose
Compose describes the same pieces Keel does: services built from your source, a database, a cache, and environment variables. Follow the six steps; this page covers what's specific to Compose.
Draft the config
bash
keel init --from docker-compose.yml # or compose.yamlHow each part of the file is read:
- A service with
build:becomes a Keel service. One that publishes a port becomes a web service on the container side of the mapping (8080:3000gives 3000). - A
postgres,mysql,redisorvalkeyimage becomes the managed database or cache. - Any other image-only service is listed as not carried over, because Keel builds services from source.
- Compose health checks run a command, and a load balancer checks a path. Web services start with
/, and the draft says so. environmentkeys becomesecrets:names. Values are never copied, becausekeel.ymlis committed.
Data
From a local Compose database:
bash
docker compose exec -T db pg_dump -Fc --no-owner --no-acl -U postgres myapp > app.dump
keel db import app.dump