bunkerweb/examples/autoconf-configs/docker-compose.yml

68 lines
1.6 KiB
YAML

version: '3'
services:
myapp1:
image: tutum/hello-world
networks:
bw-services:
aliases:
- myapp1
labels:
- "bunkerweb.SERVER_NAME=app1.example.com" # replace with your domain
- "bunkerweb.USE_REVERSE_PROXY=yes"
- "bunkerweb.REVERSE_PROXY_URL=/"
- "bunkerweb.REVERSE_PROXY_HOST=http://myapp1"
- |
CUSTOM_CONF_SERVER_HTTP_example=
location /hello {
default_type 'text/plain';
content_by_lua_block {
ngx.say('hello app1')
}
}
myapp2:
image: tutum/hello-world
networks:
bw-services:
aliases:
- myapp2
labels:
- "bunkerweb.SERVER_NAME=app2.example.com" # replace with your domain
- "bunkerweb.USE_REVERSE_PROXY=yes"
- "bunkerweb.REVERSE_PROXY_URL=/"
- "bunkerweb.REVERSE_PROXY_HOST=http://myapp2"
- |
CUSTOM_CONF_SERVER_HTTP_example=
location /hello {
default_type 'text/plain';
content_by_lua_block {
ngx.say('hello app2')
}
}
myapp3:
image: tutum/hello-world
networks:
bw-services:
aliases:
- myapp3
labels:
- "bunkerweb.SERVER_NAME=app3.example.com" # replace with your domain
- "bunkerweb.USE_REVERSE_PROXY=yes"
- "bunkerweb.REVERSE_PROXY_URL=/"
- "bunkerweb.REVERSE_PROXY_HOST=http://myapp3"
- |
CUSTOM_CONF_SERVER_HTTP_example=
location /hello {
default_type 'text/plain';
content_by_lua_block {
ngx.say('hello app3')
}
}
networks:
bw-services:
external:
name: bw-services