Moving from Docker Compose.
One command turns docker-compose.yml into Yawl services.
Connect a server
Install the agent. It connects out to the panel.
Import
Beside the compose file, run
yawl compose import. Read the notes, then run it again with--apply.Move the data
Restore a dump into each database, then
yawl deploy.
services:
web:
build: .
ports: ["8000:8000"]
environment:
DATABASE_URL: postgres://blog:secret@db:5432/blog
CACHE_URL: redis://cache:6379/0
SECRET_KEY: ${SECRET_KEY}
volumes: [uploads:/app/media]
depends_on: [db, cache]
worker:
build: .
command: celery -A blog worker
environment:
DATABASE_URL: postgres://blog:secret@db:5432/blog
db:
image: postgres:16
environment:
POSTGRES_PASSWORD: secret
volumes: [pgdata:/var/lib/postgresql/data]
cache:
image: redis:7$ yawl compose import --server hel1
Added cache (valkey).
Added db (postgres).
Added web (web).
Added worker (worker).
Note: db: POSTGRES_PASSWORD is not carried; Yawl makes the database's own password.
Note: db: the data in volume pgdata is not moved; restore a dump into db once it runs.
Note: web: SECRET_KEY uses ${SECRET_KEY}, set as written; give it its value with yawl env set.
Note: command is ignored; Yawl runs the image's own command.
Note: depends_on is ignored; Yawl starts each service on its own.
Wrote yawl.yaml. Next: yawl apply, then set the variables:
yawl env set web CACHE_URL --ref cache.url
yawl env set web DATABASE_URL --ref db.url
yawl env set web SECRET_KEY
yawl env set worker DATABASE_URL --ref db.urlWhat becomes what
| Area | Compose | In Yawl |
|---|---|---|
| Services | Database images | postgres, mysql, mariadb, mongo, redis and valkey become Yawl databases, backed up nightly. |
build: | Built from the repository's origin, on the current branch. | |
image: | Runs that image. | |
ports: | A web service with its own address and TLS. Without ports, a worker. | |
| Settings | environment: env_file: | Variables. A URL that names a database service becomes a reference, like db.url. |
${VAR} | Set as written. Give it its value with yawl env set. | |
| Named volumes | Yawl volumes at the same path, backed up nightly. | |
| Not carried | Data in volumes | Restore a dump into the new database once it runs. |
| Database passwords | Yawl makes its own. Apps get the database's url. | |
command: | Left out. Set command: on the service in yawl.yaml. | |
| Bind mounts | Skipped. A server's folders are not your machine's. | |
depends_on healthcheck networks restart | Left out, each named once in the notes. |