mirror of
https://github.com/bitwarden/server.git
synced 2025-02-01 23:31:41 +01:00
check if has port, resolves #365
This commit is contained in:
parent
7164f378fc
commit
c16825f8be
@ -66,6 +66,7 @@ namespace Bit.Setup
|
|||||||
public bool MssqlDataDockerVolume { get; set; }
|
public bool MssqlDataDockerVolume { get; set; }
|
||||||
public string HttpPort { get; set; }
|
public string HttpPort { get; set; }
|
||||||
public string HttpsPort { get; set; }
|
public string HttpsPort { get; set; }
|
||||||
|
public bool HasPort => !string.IsNullOrWhiteSpace(HttpPort) || !string.IsNullOrWhiteSpace(HttpsPort);
|
||||||
public string CoreVersion { get; set; } = "latest";
|
public string CoreVersion { get; set; } = "latest";
|
||||||
public string WebVersion { get; set; } = "latest";
|
public string WebVersion { get; set; } = "latest";
|
||||||
}
|
}
|
||||||
|
@ -120,12 +120,14 @@ services:
|
|||||||
image: bitwarden/nginx:{{{CoreVersion}}}
|
image: bitwarden/nginx:{{{CoreVersion}}}
|
||||||
container_name: bitwarden-nginx
|
container_name: bitwarden-nginx
|
||||||
restart: always
|
restart: always
|
||||||
|
{{#if HasPort}}
|
||||||
ports:
|
ports:
|
||||||
{{#if HttpPort}}
|
{{#if HttpPort}}
|
||||||
- '{{{HttpPort}}}:8080'
|
- '{{{HttpPort}}}:8080'
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if HttpsPort}}
|
{{#if HttpsPort}}
|
||||||
- '{{{HttpsPort}}}:8443'
|
- '{{{HttpsPort}}}:8443'
|
||||||
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
volumes:
|
volumes:
|
||||||
- ../nginx:/etc/bitwarden/nginx
|
- ../nginx:/etc/bitwarden/nginx
|
||||||
|
Loading…
Reference in New Issue
Block a user