@@ -59,6 +59,26 @@ migrations, then starts the API on port `8001`. Readiness is available at:
|
||||
GET http://127.0.0.1:8001/health/ready
|
||||
```
|
||||
|
||||
## Deploying A Jenkins-Built Image
|
||||
|
||||
`docker compose up --build` above builds the image from source on the target
|
||||
host. For environments that pull a pre-built image instead, `Jenkinsfile` runs
|
||||
the pytest suite (`-m "not integration"`), builds the image from the same
|
||||
`Dockerfile`, smoke-tests both console scripts (`device-cloud-api --help`,
|
||||
`device-host-agent --help`), and pushes `<REGISTRY>/<IMAGE_NAME>:<BUILD_NUMBER>-<git short sha>`
|
||||
plus `:latest` to the configured registry.
|
||||
|
||||
`compose.deploy.yaml` is the same three-service stack as `compose.yaml`
|
||||
except `cloud-api` and `host-agent` reference `image:` instead of `build:`.
|
||||
Set `REGISTRY`, `IMAGE_NAME`, and `IMAGE_TAG` (see `.env.example`) to the tag
|
||||
Jenkins published, then deploy without a local build step:
|
||||
|
||||
```bash
|
||||
docker compose -f compose.deploy.yaml pull
|
||||
docker compose -f compose.deploy.yaml up -d
|
||||
docker compose -f compose.deploy.yaml ps
|
||||
```
|
||||
|
||||
For a deployment that manages processes outside Compose, apply migrations
|
||||
before starting the new Cloud API version:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user