1. Add driver as an option, defaulting to `docker-container`. For a
"native" build you can set it to `docker`
2. Set arch as a array of architectures to build for, defaulting to
`[ "amd64", "arm64" ]` unless you are using the docker driver in
which case we default to not setting a platform
3. Remote is now just a connection string for the remote builder
4. If remote is set, we only use it for non-local arches, if we are
only building for the local arch, we'll ignore it.
Examples:
On arm64, build for arm64 locally, amd64 remotely or
On amd64, build for amd64 locally, arm64 remotely:
```yaml
builder:
remote: ssh://docker@docker-builder
```
On arm64, build amd64 on remote,
On amd64 build locally:
```yaml
builder:
arch:
- amd64
remote:
host: ssh://docker@docker-builder
```
Build amd64 on local:
```yaml
builder:
arch:
- amd64
```
Use docker driver, building for local arch:
```yaml
builder:
driver: docker
```
46 lines
887 B
YAML
46 lines
887 B
YAML
service: app
|
|
image: app
|
|
servers:
|
|
- vm1
|
|
- vm2: [ tag1, tag2 ]
|
|
env:
|
|
clear:
|
|
CLEAR_TOKEN: 4321
|
|
CLEAR_TAG: ""
|
|
HOST_TOKEN: "${HOST_TOKEN}"
|
|
secret:
|
|
- SECRET_TOKEN
|
|
tags:
|
|
tag1:
|
|
CLEAR_TAG: tagged
|
|
tag2:
|
|
secret:
|
|
- SECRET_TAG
|
|
asset_path: /usr/share/nginx/html/versions
|
|
|
|
registry:
|
|
server: registry:4443
|
|
username: root
|
|
password: root
|
|
builder:
|
|
driver: docker
|
|
args:
|
|
COMMIT_SHA: <%= `git rev-parse HEAD` %>
|
|
healthcheck:
|
|
cmd: wget -qO- http://localhost > /dev/null || exit 1
|
|
max_attempts: 3
|
|
traefik:
|
|
args:
|
|
accesslog: true
|
|
accesslog.format: json
|
|
image: registry:4443/traefik:v2.10
|
|
accessories:
|
|
busybox:
|
|
service: custom-busybox
|
|
image: registry:4443/busybox:1.36.0
|
|
cmd: sh -c 'echo "Starting busybox..."; trap exit term; while true; do sleep 1; done'
|
|
roles:
|
|
- web
|
|
stop_wait_time: 1
|
|
readiness_delay: 0
|