mirror of
https://github.com/bitwarden/server.git
synced 2025-04-05 21:18:13 -05:00
Allow changing default NGINX port in unified (#2484)
This commit is contained in:
parent
328c2ca21c
commit
9ca93381ce
@ -202,8 +202,6 @@ ENV globalSettings__send__baseDirectory="/etc/bitwarden/attachments/send"
|
|||||||
ENV globalSettings__licenseDirectory="/etc/bitwarden/licenses"
|
ENV globalSettings__licenseDirectory="/etc/bitwarden/licenses"
|
||||||
ENV globalSettings__logDirectoryByProject="false"
|
ENV globalSettings__logDirectoryByProject="false"
|
||||||
ENV globalSettings__logRollBySizeLimit="1073741824"
|
ENV globalSettings__logRollBySizeLimit="1073741824"
|
||||||
EXPOSE 80
|
|
||||||
EXPOSE 443
|
|
||||||
|
|
||||||
# Add packages
|
# Add packages
|
||||||
RUN apk add --update-cache \
|
RUN apk add --update-cache \
|
||||||
@ -288,5 +286,4 @@ VOLUME ["/etc/bitwarden"]
|
|||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
USER bitwarden:bitwarden
|
USER bitwarden:bitwarden
|
||||||
HEALTHCHECK CMD curl --insecure -Lfs https://localhost/alive || curl -Lfs http://localhost/alive || exit 1
|
|
||||||
ENTRYPOINT ["/entrypoint.sh"]
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
|
@ -10,8 +10,8 @@ services:
|
|||||||
image: ${REGISTRY:-bitwarden}/self-host:${TAG:-beta}
|
image: ${REGISTRY:-bitwarden}/self-host:${TAG:-beta}
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "80:8080"
|
||||||
- "443:443"
|
- "443:8443"
|
||||||
volumes:
|
volumes:
|
||||||
- bitwarden:/etc/bitwarden
|
- bitwarden:/etc/bitwarden
|
||||||
- logs:/var/log/bitwarden
|
- logs:/var/log/bitwarden
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
server {
|
server {
|
||||||
listen 80 default_server;
|
listen {{{String.Coalesce env.BW_PORT_HTTP "8080"}}} default_server;
|
||||||
#listen [::]:80 default_server;
|
#listen [::]:{{{String.Coalesce env.BW_PORT_HTTP "8080"}}} default_server;
|
||||||
server_name {{{String.Coalesce env.BW_DOMAIN "localhost"}}};
|
server_name {{{String.Coalesce env.BW_DOMAIN "localhost"}}};
|
||||||
{{#if (String.Equal env.BW_ENABLE_SSL "true")}}
|
{{#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 {
|
server {
|
||||||
listen 443 ssl http2;
|
listen {{{String.Coalesce env.BW_PORT_HTTPS "8443"}}} ssl http2;
|
||||||
#listen [::]:443 ssl http2;
|
#listen [::]:{{{String.Coalesce env.BW_PORT_HTTPS "8443"}}} ssl http2;
|
||||||
server_name {{{String.Coalesce env.BW_DOMAIN "localhost"}}};
|
server_name {{{String.Coalesce env.BW_DOMAIN "localhost"}}};
|
||||||
|
|
||||||
ssl_certificate /etc/bitwarden/{{{String.Coalesce env.BW_SSL_CERT "ssl.crt"}}};
|
ssl_certificate /etc/bitwarden/{{{String.Coalesce env.BW_SSL_CERT "ssl.crt"}}};
|
||||||
|
@ -23,6 +23,10 @@ BW_INSTALLATION_KEY=xxxxxxxxxxxx
|
|||||||
#####################
|
#####################
|
||||||
# Learn more here: https://bitwarden.com/help/environment-variables/
|
# Learn more here: https://bitwarden.com/help/environment-variables/
|
||||||
|
|
||||||
|
# Webserver ports
|
||||||
|
#BW_PORT_HTTP=8080
|
||||||
|
#BW_PORT_HTTPS=8443
|
||||||
|
|
||||||
# SSL
|
# SSL
|
||||||
#BW_ENABLE_SSL=true
|
#BW_ENABLE_SSL=true
|
||||||
#BW_ENABLE_SSL_CA=true
|
#BW_ENABLE_SSL_CA=true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user