All role specific proxy configuration
By default only the primary role runs the proxy. To disable the proxy for that role, you can set `proxy: false` under it. For other roles they default to not running the proxy, but you can enable it by setting `proxy: true` for the role, or alternatively setting a proxy configuration. The proxy configuration will be merged into the root proxy configuration.
This commit is contained in:
@@ -2,12 +2,12 @@ service: app
|
||||
image: dhh/app
|
||||
servers:
|
||||
web_chicago:
|
||||
proxy: true
|
||||
proxy: {}
|
||||
hosts:
|
||||
- 1.1.1.1
|
||||
- 1.1.1.2
|
||||
web_tokyo:
|
||||
proxy: true
|
||||
proxy: {}
|
||||
hosts:
|
||||
- 1.1.1.3
|
||||
- 1.1.1.4
|
||||
|
||||
2
test/fixtures/deploy_with_extensions.yml
vendored
2
test/fixtures/deploy_with_extensions.yml
vendored
@@ -1,6 +1,6 @@
|
||||
|
||||
x-web: &web
|
||||
proxy: true
|
||||
proxy: {}
|
||||
|
||||
service: app
|
||||
image: dhh/app
|
||||
|
||||
46
test/fixtures/deploy_with_proxy_roles.yml
vendored
Normal file
46
test/fixtures/deploy_with_proxy_roles.yml
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
service: app
|
||||
image: dhh/app
|
||||
servers:
|
||||
web:
|
||||
hosts:
|
||||
- "1.1.1.1"
|
||||
- "1.1.1.2"
|
||||
web2:
|
||||
hosts:
|
||||
- "1.1.1.3"
|
||||
- "1.1.1.4"
|
||||
proxy:
|
||||
response_timeout: 15
|
||||
registry:
|
||||
username: user
|
||||
password: pw
|
||||
builder:
|
||||
arch: amd64
|
||||
|
||||
proxy:
|
||||
response_timeout: 10
|
||||
|
||||
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
|
||||
deploy_timeout: 6
|
||||
Reference in New Issue
Block a user