Bring a project in line with a Docker Compose file: file from POST /compose/sync-plan, which shows what this does. Only what the file says differently changes, so settings changed in Pyo that the file doesn't mention stay, and a secret's value is never changed. An image's tag or digest follows the file only when the file changed it since the last sync, so one a deploy set stays. Services whose settings change are deployed. What can't change in place (a volume that would move, another kind of source) is left as it is.
A service no longer in the file stays, unless prune.
API key access: full.
apiKeyAuthorizationBearer <pyo_…>An API key from the dashboard's API keys page: Authorization: Bearer pyo_…. Keys can expire, and an expired one gets a 401.
application/jsonBring a project in line with a Docker Compose file: file from POST /compose/sync-plan, which shows what this does. Only what the file says differently changes, so settings changed in Pyo that the file doesn't mention stay, and a secret's value is never changed. An image's tag or digest follows the file only when the file changed it since the last sync, so one a deploy set stays. Services whose settings change are deployed. What can't change in place (a volume that would move, another kind of source) is left as it is.
A service no longer in the file stays, unless prune.
API key access: full.
op*"syncCompose""syncCompose"projectId*stringclusterId?|Where services new in the file run. Where the project's services run when omitted.
plan*A whole import: what will be created, and what was left out.
prune?booleanDelete the services made from this file that are no longer in it. Their volumes are kept, detached.
confirm?booleanGo ahead with a very large replica change: without it, one that goes to 20 or more replicas and to more than 10 times what the service had, or more than twice what its servers have room for, is refused with 409 and needsConfirm: true. Ask the user before sending it.
Done. Always ok: true, and some operations add more, such as a new API key or a join command. A warning comes with a change that went through but won't fully take effect yet, such as more replicas than the servers have room for.
application/jsoncurl -X POST 'https://your-pyo.example.com/api/v1/ops' \
-H 'Content-Type: application/json' \
-d '{
"op": "syncCompose",
"plan": {
"project": {
"file": "compose.yaml",
"name": "Shop",
"namespace": "shop"
},
"services": [],
"warnings": []
},
"projectId": "prj_8kq2x7ad"
}'{}