Moving from Docker Compose.

One command turns docker-compose.yml into Yawl services.

  1. Connect a server

    Install the agent. It connects out to the panel.

  2. Import

    Beside the compose file, run yawl compose import. Read the notes, then run it again with --apply.

  3. 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.url

What becomes what

AreaComposeIn Yawl
ServicesDatabase imagespostgres, 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.
Settingsenvironment: 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 volumesYawl volumes at the same path, backed up nightly.
Not carriedData in volumesRestore a dump into the new database once it runs.
Database passwordsYawl makes its own. Apps get the database's url.
command:Left out. Set command: on the service in yawl.yaml.
Bind mountsSkipped. A server's folders are not your machine's.
depends_on healthcheck networks restartLeft out, each named once in the notes.