From a281e9906d426666adfa59e802a55cc97eb0f63e Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Mon, 7 Aug 2017 17:08:41 -0400 Subject: [PATCH] docker web image --- docker/docker-compose.yml | 5 +++++ util/Setup/Program.cs | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index f87f22848..8f40a9b27 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -10,6 +10,11 @@ services: - mssql.override.env ports: - '1433:1433' + + web: + image: bitwarden/web + container_name: web + restart: always api: image: bitwarden/api diff --git a/util/Setup/Program.cs b/util/Setup/Program.cs index 1ad275ebd..b7eb33231 100644 --- a/util/Setup/Program.cs +++ b/util/Setup/Program.cs @@ -124,6 +124,16 @@ server {{ } sw.WriteLine($@" + location / {{ + proxy_pass http://web/; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header Host $host; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Url-Scheme $scheme; + proxy_redirect off; + }} + location /api/ {{ proxy_pass http://api/; proxy_set_header X-Real-IP $remote_addr;