Docs Guides
Deploy services
Deploy Docker Compose applications with rolling updates, health checks and one-command rollbacks.
A service is a Docker Compose application that Fwoop deploys to every server matching its target. Fwoop doesn’t build images: it pulls them from your registry, so keep building them in CI.
Your first service
Fwoop reads standard Compose v2 files. Deploy one from the folder it lives in:
$ fwoop deploy api --target role=api
Or describe the service in fwoop.yaml and apply it:
services:
api:
compose: compose.yaml
target: role=api
strategy: rolling
ready_after: healthcheck
secrets: production
Rollouts
With the default rolling strategy, Fwoop updates one server at a time. On each server it starts the new containers, waits until they’re healthy, then stops the old ones. If a health check fails, the rollout stops and the previous release keeps serving.
| Setting | Values | Default |
|---|---|---|
strategy | rolling, recreate | rolling |
ready_after | healthcheck, a duration like 10s | healthcheck if the compose file defines one, else 5s |
max_parallel | number of servers updated at once | 1 |
rollout.order | list of targets to roll through in order | none |
rollout.pause | wait between steps of rollout.order | 0s |
Health checks
Fwoop uses the healthcheck from your compose file. Without one, a container counts as ready once it has been running for the ready_after duration. You can also add an HTTP check in fwoop.yaml:
services:
api:
health:
http: http://localhost:8080/health
expect: 200
timeout: 3s
Releases and rollbacks
Every deploy creates a release that pins the image digests, the compose file and the secrets version. List them and roll back to any release in your plan’s history:
$ fwoop releases api
r142 live 1.42.0 ci@acme 2 min ago
r141 replaced 1.41.2 ci@acme yesterday
$ fwoop rollback api r141
Deploying from CI
Create a deploy token under Settings → API tokens with the deploy scope and store it as FWOOP_TOKEN in your CI. For GitHub Actions:
- name: Deploy
run: |
curl -fsSL https://get.fwoop.dev/cli | sh
fwoop deploy api --target role=api --wait
env:
FWOOP_TOKEN: ${{ secrets.FWOOP_TOKEN }}
--wait makes the command exit non-zero if the rollout fails, so the CI job fails too.
Logs
Stream logs from every container of a service, across servers:
$ fwoop logs api -f
Logs stream from the agents and aren’t stored by Fwoop.
Private registries
Add registry credentials as secrets named REGISTRY_<HOST>_USER and REGISTRY_<HOST>_PASSWORD, or under Settings → Registries. Agents log in before pulling.