mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 07:36:14 -05:00
Reverse proxy / load balancer configuration for local development (#2097)
* Add server reverse proxy configuration example for docker compose * Use n + 100 for Identity load balancer port
This commit is contained in:
35
dev/reverse-proxy.conf.example
Normal file
35
dev/reverse-proxy.conf.example
Normal file
@ -0,0 +1,35 @@
|
||||
# Begin API Service
|
||||
|
||||
upstream api_loadbalancer {
|
||||
# Add additional API services here uniquely identified by their port
|
||||
# Below assumes two services running on the docker host machine on ports 4000 and 4002
|
||||
server host.docker.internal:4000;
|
||||
server host.docker.internal:4002;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 4100; # The port clients will connect to for the Api, must be exposed via Docker
|
||||
location / {
|
||||
proxy_pass http://api_loadbalancer;
|
||||
}
|
||||
}
|
||||
|
||||
# End API Service
|
||||
|
||||
# Begin Identity Service
|
||||
|
||||
upstream identity_loadbalancer {
|
||||
# Add additional Identity services here uniquely identified by their port
|
||||
# Below assumes two services running on the docker host machine on ports 33656 and 33658
|
||||
server host.docker.internal:33656;
|
||||
server host.docker.internal:33658;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 33756; # The port clients will connect to for the Identiy, must be exposed via Docker
|
||||
location / {
|
||||
proxy_pass http://identity_loadbalancer;
|
||||
}
|
||||
}
|
||||
|
||||
# End Identity Service
|
Reference in New Issue
Block a user