Files
fizzy/config/deploy.production.yml
T
Kevin McConnell d96db67734 Configure deployment for load balancing
- Adds a load balancer accessory
- Disables SSL from the app's proxy (since the LB will handle it)
2025-04-25 14:18:04 +01:00

56 lines
957 B
YAML

servers:
web:
hosts:
- fizzy-app-101
jobs:
hosts:
- fizzy-app-101
web-replica:
hosts:
- fizzy-app-102
proxy: true
proxy:
ssl: false
ssh:
user: app
x-beamer-accessory: &beamer-accessory
image: basecamp/beamer
registry:
username: bcbot
password:
- BASECAMP_REGISTRY_PASSWORD
options:
user: 1000 # Match the UID of the Rails app, for volume permissions
volumes:
- fizzy:/storage
accessories:
beamer-primary:
<<: *beamer-accessory
service: beamer-primary
cmd: beamer primary --remove-after=1h --dir=/storage
port: 5000:80
roles:
- web
beamer-replica:
<<: *beamer-accessory
service: beamer-replica
cmd: beamer replica --primary=http://fizzy-app-101:5000/ --dir=/storage
roles:
- web-replica
load-balancer:
image: basecamp/kamal-proxy:lb
roles:
- web
options:
publish:
- 80:80
- 443:443