Quickstart
This guide walks you through wiring reoclo/deploy-sync@v2 into a workflow that already runs docker compose up or docker run on a Reoclo-managed server. The action is published on the GitHub Marketplace; pin to @v2 for the latest v2.x release or to an exact tag for reproducible builds.
-
Generate an automation API key with the
external_deployscopeIn the Reoclo dashboard:
- Navigate to API Keys, then switch to the Automation Keys tab.
- Click Create Automation Key.
- Give it a name like
github-deploy-sync-prod. - Under Allowed Operations, enable
external_deploy. - Optionally restrict the key to a specific server and set an IP allowlist.
- Click Create and copy the key immediately — it is shown only once.
The key will begin with
rca_. -
Add the key to your GitHub repository secrets
In your GitHub repository, go to Settings > Secrets and variables > Actions and add:
REOCLO_API_KEY— therca_key you just created.
-
Add the sync step to your workflow
Insert the
reoclo/deploy-sync@v2step immediately after yourdocker compose upordocker runstep:name: Deployon:push:branches: [main]jobs:deploy:runs-on: ubuntu-lateststeps:- name: Deploy containersuses: reoclo/run@v2with:api_key: ${{ secrets.REOCLO_API_KEY }}server_id: ${{ secrets.REOCLO_SERVER_ID }}command: |cd /srv/reoclo/myappdocker compose -f docker-compose.prod.yml pulldocker compose -f docker-compose.prod.yml up -dtimeout: 300- name: Sync routes with Reoclouses: reoclo/deploy-sync@v2with:api_key: ${{ secrets.REOCLO_API_KEY }}compose_file: ./docker-compose.prod.yml/srv/reoclo/myapp/is the recommended on-server location — the runner installer pre-creates/srv/reoclo/with a sharedreoclo-deploygroup so both the runner and your human admins can write to it withoutchown. See Deployment Folder & Permissions for the full layout.The action reads
docker-compose.prod.ymlfrom the runner workspace to discover which services to sync. Only services on thereoclo-proxynetwork or labeledreoclo.managed=trueare considered; others are reported asunmatchedand skipped.If you are not using Docker Compose, pass an explicit service list instead:
- uses: reoclo/deploy-sync@v2with:api_key: ${{ secrets.REOCLO_API_KEY }}services: "myapp-web:3000,myapp-api:8080" -
Bind each routed service to its Application
Reoclo needs to know which Application a discovered service maps to. The container name it receives is the service’s
container_name:or, if unset, the Compose service key (e.g.app) — which is almost never the running container name (<project>-<service>-<index>, e.g.myapp-app-1). So binding by name alone is fragile and is the usual cause of a400: None of the supplied identifiers matched an application.Recommended: label the service with your Application’s slug so identity no longer depends on the container name:
services:app:image: ghcr.io/myorg/app:${{ github.sha }}networks: [reoclo-proxy]expose: ["3000"]labels:reoclo.app: my-application-slug # bind to this Application by slugAlternatives: set an explicit
container_name:and link the Application to that exact name, or add alinked_container_namesalias /linked_container_name_patternglob to the Application. See Matching a service to its Application. -
Run the workflow and confirm in the dashboard
Push a commit to trigger the workflow. After the sync step succeeds you should see:
- The step summary shows
status: syncedfor each matched Application and lists the FQDNs that were updated. - In the Reoclo dashboard, the Application’s Proxy tab shows a refreshed
upstreampointing at the current container name and port. - Visiting the Application’s FQDN returns a live response from the freshly deployed container.
If a container name is not matched to any Application, the step logs
unmatched: [container_name]and succeeds without error — unrecognized containers are silently skipped. - The step summary shows
What happens on subsequent runs
Section titled “What happens on subsequent runs”| Scenario | Status | Effect |
|---|---|---|
| Same container name, same port, same image tag | noop | No proxy changes; Caddy not triggered |
| Same container name, different port or image tag | synced | Proxy rewritten, Caddy reconciler triggered |
| Different configuration within 30 seconds of a previous sync | conflict | No changes; pass force: true to override |
Next steps
Section titled “Next steps”- GitHub Action Reference — all inputs and outputs.
- Compose Deployments — network setup and multi-service examples.
- Troubleshooting — if the step errors or sites stay on 502.