diff --git a/docker/docker-compose.linux.yml b/docker/docker-compose.linux.yml index 9badb61b7..3505828e6 100644 --- a/docker/docker-compose.linux.yml +++ b/docker/docker-compose.linux.yml @@ -3,31 +3,31 @@ version: '3' services: mssql: volumes: - - /etc/bitwarden/mssql_data:/var/opt/mssql/data + - ../../mssql_data:/var/opt/mssql/data env_file: - mssql.env - - /etc/bitwarden/docker/mssql.override.env + - ../../env/mssql.override.env web: volumes: - - /etc/bitwarden/web:/etc/bitwarden/web + - ../../web:/etc/bitwarden/web attachments: volumes: - - /etc/bitwarden/core/attachments:/etc/bitwarden/core/attachments + - ../../core/attachments:/etc/bitwarden/core/attachments api: volumes: - - /etc/bitwarden/core:/etc/bitwarden/core + - ../../core:/etc/bitwarden/core env_file: - global.env - - /etc/bitwarden/docker/global.override.env + - ../../env/global.override.env identity: volumes: - - /etc/bitwarden/identity:/etc/bitwarden/identity - - /etc/bitwarden/core:/etc/bitwarden/core + - ../../identity:/etc/bitwarden/identity + - ../../core:/etc/bitwarden/core env_file: - global.env - - /etc/bitwarden/docker/global.override.env + - ../../env/global.override.env nginx: volumes: - - /etc/bitwarden/nginx:/etc/bitwarden/nginx - - /etc/bitwarden/letsencrypt:/etc/letsencrypt - - /etc/bitwarden/ssl:/etc/ssl + - ../../nginx:/etc/bitwarden/nginx + - ../../letsencrypt:/etc/letsencrypt + - ../../ssl:/etc/ssl diff --git a/docker/docker-compose.mac.yml b/docker/docker-compose.mac.yml index b184d4355..8b9097f23 100644 --- a/docker/docker-compose.mac.yml +++ b/docker/docker-compose.mac.yml @@ -6,30 +6,30 @@ services: - mssql_data:/var/opt/mssql/data env_file: - mssql.env - - /etc/bitwarden/docker/mssql.override.env + - ../../env/mssql.override.env web: volumes: - - /etc/bitwarden/web:/etc/bitwarden/web + - ../../web:/etc/bitwarden/web attachments: volumes: - - /etc/bitwarden/core/attachments:/etc/bitwarden/core/attachments + - ../../core/attachments:/etc/bitwarden/core/attachments api: volumes: - - /etc/bitwarden/core:/etc/bitwarden/core + - ../../core:/etc/bitwarden/core env_file: - global.env - - /etc/bitwarden/docker/global.override.env + - ../../env/global.override.env identity: volumes: - - /etc/bitwarden/identity:/etc/bitwarden/identity - - /etc/bitwarden/core:/etc/bitwarden/core + - ../../identity:/etc/bitwarden/identity + - ../../core:/etc/bitwarden/core env_file: - global.env - - /etc/bitwarden/docker/global.override.env + - ../../env/global.override.env nginx: volumes: - - /etc/bitwarden/nginx:/etc/bitwarden/nginx - - /etc/bitwarden/letsencrypt:/etc/letsencrypt - - /etc/bitwarden/ssl:/etc/ssl + - ../../nginx:/etc/bitwarden/nginx + - ../../letsencrypt:/etc/letsencrypt + - ../../ssl:/etc/ssl volumes: mssql_data: diff --git a/util/Setup/Helpers.cs b/util/Setup/Helpers.cs index be542ed10..139dcc800 100644 --- a/util/Setup/Helpers.cs +++ b/util/Setup/Helpers.cs @@ -110,12 +110,12 @@ namespace Setup public static string GetDatabasePasswordFronEnvFile() { - if(!File.Exists("/bitwarden/docker/mssql.override.env")) + if(!File.Exists("/bitwarden/env/mssql.override.env")) { return null; } - var lines = File.ReadAllLines("/bitwarden/docker/mssql.override.env"); + var lines = File.ReadAllLines("/bitwarden/env/mssql.override.env"); foreach(var line in lines) { if(line.StartsWith("SA_PASSWORD=")) diff --git a/util/Setup/Program.cs b/util/Setup/Program.cs index ea3b655fc..fc6977d74 100644 --- a/util/Setup/Program.cs +++ b/util/Setup/Program.cs @@ -360,11 +360,11 @@ server {{ private static void BuildEnvironmentFiles() { Console.WriteLine("Building docker environment override files."); - Directory.CreateDirectory("/bitwarden/docker/"); + Directory.CreateDirectory("/bitwarden/env/"); var dbPass = Helpers.SecureRandomString(32); var dbConnectionString = Helpers.MakeSqlConnectionString("mssql", "vault", "sa", dbPass); - using(var sw = File.CreateText("/bitwarden/docker/global.override.env")) + using(var sw = File.CreateText("/bitwarden/env/global.override.env")) { sw.Write($@"globalSettings__baseServiceUri__vault={_url} globalSettings__baseServiceUri__api={_url}/api @@ -389,7 +389,7 @@ globalSettings__pushRelayBaseUri=REPLACE"); } } - using(var sw = File.CreateText("/bitwarden/docker/mssql.override.env")) + using(var sw = File.CreateText("/bitwarden/env/mssql.override.env")) { sw.Write($@"ACCEPT_EULA=Y MSSQL_PID=Express