mirror of
https://github.com/bunkerity/bunkerweb
synced 2026-05-24 09:28:37 +00:00
43 lines
1 KiB
YAML
43 lines
1 KiB
YAML
version: "3"
|
|
|
|
services:
|
|
app1:
|
|
image: tutum/hello-world
|
|
networks:
|
|
bw-services:
|
|
aliases:
|
|
- app1
|
|
labels:
|
|
- bunkerweb.SERVER_NAME=www.example.com
|
|
- bunkerweb.USE_REVERSE_PROXY=yes
|
|
- bunkerweb.REVERSE_PROXY_URL_1=~ ^/app1/(.*)$$
|
|
- bunkerweb.REVERSE_PROXY_HOST_1=http://app1/$$1
|
|
- |
|
|
bunkerweb.CUSTOM_CONF_SERVER_HTTP_redirects=
|
|
port_in_redirect off;
|
|
location ~ ^/(app1|app2)$$ {
|
|
rewrite ^(.*)$$ $$1/ permanent;
|
|
}
|
|
|
|
app2:
|
|
image: tutum/hello-world
|
|
networks:
|
|
bw-services:
|
|
aliases:
|
|
- app2
|
|
labels:
|
|
- bunkerweb.SERVER_NAME=www.example.com
|
|
- bunkerweb.USE_REVERSE_PROXY=yes
|
|
- bunkerweb.REVERSE_PROXY_URL_2=~ ^/app2/(.*)$$
|
|
- bunkerweb.REVERSE_PROXY_HOST_2=http://app2/$$1
|
|
- |
|
|
bunkerweb.CUSTOM_CONF_SERVER_HTTP_redirects=
|
|
port_in_redirect off;
|
|
location ~ ^/(app1|app2)$$ {
|
|
rewrite ^(.*)$$ $$1/ permanent;
|
|
}
|
|
|
|
networks:
|
|
bw-services:
|
|
external:
|
|
name: bw-services
|