1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-21 12:05:42 +01:00

Allow changing default NGINX port in unified (#2484)

This commit is contained in:
Vince Grassia 2022-12-08 17:10:49 -05:00 committed by GitHub
parent 328c2ca21c
commit 9ca93381ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 10 deletions

View File

@ -202,8 +202,6 @@ ENV globalSettings__send__baseDirectory="/etc/bitwarden/attachments/send"
ENV globalSettings__licenseDirectory="/etc/bitwarden/licenses"
ENV globalSettings__logDirectoryByProject="false"
ENV globalSettings__logRollBySizeLimit="1073741824"
EXPOSE 80
EXPOSE 443
# Add packages
RUN apk add --update-cache \
@ -288,5 +286,4 @@ VOLUME ["/etc/bitwarden"]
WORKDIR /app
USER bitwarden:bitwarden
HEALTHCHECK CMD curl --insecure -Lfs https://localhost/alive || curl -Lfs http://localhost/alive || exit 1
ENTRYPOINT ["/entrypoint.sh"]

View File

@ -10,8 +10,8 @@ services:
image: ${REGISTRY:-bitwarden}/self-host:${TAG:-beta}
restart: always
ports:
- "80:80"
- "443:443"
- "80:8080"
- "443:8443"
volumes:
- bitwarden:/etc/bitwarden
- logs:/var/log/bitwarden

View File

@ -1,15 +1,15 @@
server {
listen 80 default_server;
#listen [::]:80 default_server;
listen {{{String.Coalesce env.BW_PORT_HTTP "8080"}}} default_server;
#listen [::]:{{{String.Coalesce env.BW_PORT_HTTP "8080"}}} default_server;
server_name {{{String.Coalesce env.BW_DOMAIN "localhost"}}};
{{#if (String.Equal env.BW_ENABLE_SSL "true")}}
return 301 https://{{{String.Coalesce env.BW_DOMAIN "localhost"}}}$request_uri;
return 301 https://{{{String.Coalesce env.BW_DOMAIN "localhost"}}}:{{{String.Coalesce env.BW_PORT_HTTPS "8443"}}}$request_uri;
}
server {
listen 443 ssl http2;
#listen [::]:443 ssl http2;
listen {{{String.Coalesce env.BW_PORT_HTTPS "8443"}}} ssl http2;
#listen [::]:{{{String.Coalesce env.BW_PORT_HTTPS "8443"}}} ssl http2;
server_name {{{String.Coalesce env.BW_DOMAIN "localhost"}}};
ssl_certificate /etc/bitwarden/{{{String.Coalesce env.BW_SSL_CERT "ssl.crt"}}};

View File

@ -23,6 +23,10 @@ BW_INSTALLATION_KEY=xxxxxxxxxxxx
#####################
# Learn more here: https://bitwarden.com/help/environment-variables/
# Webserver ports
#BW_PORT_HTTP=8080
#BW_PORT_HTTPS=8443
# SSL
#BW_ENABLE_SSL=true
#BW_ENABLE_SSL_CA=true