Files
kamal/test/integration/docker/deployer/app/config/deploy.yml
Donal McBreen 6aa707e233 Use local registry for app images
Allow applications to be deployed without needing to set up a repository
in a remote Docker registry.

If the registry server starts with `localhost`, Kamal will start a local
docker registry on that port and push the app image to it.

Then when pulling the image onto the servers, we use net-ssh to forward
the that port from the app server to the deployment server.

This will allow the deployment server to pull the image from the
registry as if it were local, meaning we don't need to set up a cert.
2024-09-23 15:18:28 +01:00

42 lines
828 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
- INTERPOLATED_SECRET1
- INTERPOLATED_SECRET2
- INTERPOLATED_SECRET3
tags:
tag1:
CLEAR_TAG: tagged
tag2:
secret:
- SECRET_TAG
asset_path: /usr/share/nginx/html/versions
deploy_timeout: 2
drain_timeout: 2
readiness_delay: 0
proxy:
host: 127.0.0.1
registry:
server: localhost:5000
builder:
driver: docker
arch: <%= Kamal::Utils.docker_arch %>
args:
COMMIT_SHA: <%= `git rev-parse HEAD` %>
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