mirror of
https://github.com/bitwarden/server.git
synced 2024-11-21 12:05:42 +01: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:
parent
2bf8438ff7
commit
9a12992b59
@ -12,3 +12,8 @@ MYSQL_ROOT_PASSWORD=SET_A_PASSWORD_HERE_123
|
||||
# Complete using the values from the Manage SSO page in the web vault
|
||||
IDP_SP_ENTITY_ID=http://localhost:51822/saml2
|
||||
IDP_SP_ACS_URL=http://localhost:51822/saml2/yourOrgIdHere/Acs
|
||||
|
||||
# Optional reverse proxy configuration
|
||||
# Should match server listen ports in reverse-proxy.conf
|
||||
API_PROXY_PORT=4100
|
||||
IDENTITY_PROXY_PORT=33756
|
3
dev/.gitignore
vendored
3
dev/.gitignore
vendored
@ -13,3 +13,6 @@ identity_server_dev.pfx
|
||||
data_protection_dev.crt
|
||||
data_protection_dev.key
|
||||
data_protection_dev.pfx
|
||||
|
||||
# Reverse Proxy Conifg
|
||||
reverse-proxy.conf
|
@ -97,6 +97,17 @@ services:
|
||||
- '636:636'
|
||||
profiles:
|
||||
- ldap
|
||||
|
||||
reverse-proxy:
|
||||
image: nginx:alpine
|
||||
container_name: reverse-proxy
|
||||
volumes:
|
||||
- "./reverse-proxy.conf:/etc/nginx/conf.d/default.conf"
|
||||
ports:
|
||||
- "${API_PROXY_PORT}:${API_PROXY_PORT}"
|
||||
- "${IDENTITY_PROXY_PORT}:${IDENTITY_PROXY_PORT}"
|
||||
profiles:
|
||||
- proxy
|
||||
|
||||
volumes:
|
||||
edgesql_dev_data:
|
||||
|
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
|
Loading…
Reference in New Issue
Block a user