mirror of
https://github.com/roleypoly/roleypoly-v1.git
synced 2025-06-16 10:19:10 +00:00
[misc]: add http service proxy between ui and api
This commit is contained in:
parent
b90bb5c2ed
commit
0f48567f17
3 changed files with 28 additions and 0 deletions
3
etc/proxy/Dockerfile
Normal file
3
etc/proxy/Dockerfile
Normal file
|
@ -0,0 +1,3 @@
|
|||
FROM haproxy:1.9-alpine
|
||||
ENV UI_ADDR=ui:6768 API_ADDR=api:6769
|
||||
COPY haproxy.cfg /usr/local/etc/haproxy/haproxy.cfg
|
17
etc/proxy/haproxy.cfg
Normal file
17
etc/proxy/haproxy.cfg
Normal file
|
@ -0,0 +1,17 @@
|
|||
frontend www-incoming
|
||||
bind :80
|
||||
mode http
|
||||
default_backend ui
|
||||
acl api_req path -i -m beg /api
|
||||
acl api_req path -i -m beg /magic
|
||||
use_backend api if api_req
|
||||
|
||||
backend ui
|
||||
mode http
|
||||
balance roundrobin
|
||||
server server0 ${UI_ADDR} check
|
||||
|
||||
backend api
|
||||
mode http
|
||||
balance roundrobin
|
||||
server server0 ${API_ADDR} check
|
Loading…
Add table
Add a link
Reference in a new issue