The proxy can be enabled via the config:
```
proxy:
enabled: true
hosts:
- 10.0.0.1
- 10.0.0.2
```
This will enable the proxy and cause it to be run on the hosts listed
under `hosts`, after running `kamal proxy reboot`.
Enabling the proxy disables `kamal traefik` commands and replaces them
with `kamal proxy` ones. However only the marked hosts will run the
kamal-proxy container, the rest will run Traefik as before.
43 lines
639 B
YAML
43 lines
639 B
YAML
service: app
|
|
image: dhh/app
|
|
servers:
|
|
web:
|
|
- "1.1.1.1"
|
|
- "1.1.1.2"
|
|
workers:
|
|
- "1.1.1.3"
|
|
- "1.1.1.4"
|
|
registry:
|
|
username: user
|
|
password: pw
|
|
|
|
proxy:
|
|
enabled: true
|
|
hosts:
|
|
- "1.1.1.1"
|
|
deploy_timeout: 6s
|
|
|
|
accessories:
|
|
mysql:
|
|
image: mysql:5.7
|
|
host: 1.1.1.3
|
|
port: 3306
|
|
env:
|
|
clear:
|
|
MYSQL_ROOT_HOST: '%'
|
|
secret:
|
|
- MYSQL_ROOT_PASSWORD
|
|
files:
|
|
- test/fixtures/files/my.cnf:/etc/mysql/my.cnf
|
|
directories:
|
|
- data:/var/lib/mysql
|
|
redis:
|
|
image: redis:latest
|
|
roles:
|
|
- web
|
|
port: 6379
|
|
directories:
|
|
- data:/data
|
|
|
|
readiness_delay: 0
|