mirror of
https://github.com/bitwarden/server.git
synced 2026-01-24 10:53:10 +08:00
Updated devcontainer configs, fixed migration variable bug, added DEV_CERT_CONTENTS to .env.example (#6891)
This commit is contained in:
@@ -3,9 +3,10 @@
|
||||
"dockerComposeFile": "../../.devcontainer/bitwarden_common/docker-compose.yml",
|
||||
"service": "bitwarden_server",
|
||||
"workspaceFolder": "/workspace",
|
||||
"initializeCommand": "mkdir -p dev/.data/keys dev/.data/mssql dev/.data/azurite dev/helpers/mssql",
|
||||
"features": {
|
||||
"ghcr.io/devcontainers/features/node:1": {
|
||||
"version": "16"
|
||||
"version": "22"
|
||||
},
|
||||
"ghcr.io/devcontainers/features/rust:1": {}
|
||||
},
|
||||
@@ -22,5 +23,27 @@
|
||||
"extensions": ["ms-dotnettools.csdevkit"]
|
||||
}
|
||||
},
|
||||
"postCreateCommand": "bash .devcontainer/community_dev/postCreateCommand.sh"
|
||||
"postCreateCommand": "bash .devcontainer/community_dev/postCreateCommand.sh",
|
||||
"forwardPorts": [1080, 1433, 3306, 5432],
|
||||
"portsAttributes": {
|
||||
"default": {
|
||||
"onAutoForward": "ignore"
|
||||
},
|
||||
"1080": {
|
||||
"label": "Mail Catcher",
|
||||
"onAutoForward": "notify"
|
||||
},
|
||||
"1433": {
|
||||
"label": "SQL Server",
|
||||
"onAutoForward": "notify"
|
||||
},
|
||||
"3306": {
|
||||
"label": "MySQL",
|
||||
"onAutoForward": "notify"
|
||||
},
|
||||
"5432": {
|
||||
"label": "PostgreSQL",
|
||||
"onAutoForward": "notify"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,9 +6,10 @@
|
||||
],
|
||||
"service": "bitwarden_server",
|
||||
"workspaceFolder": "/workspace",
|
||||
"initializeCommand": "mkdir -p dev/.data/keys dev/.data/mssql dev/.data/azurite dev/helpers/mssql",
|
||||
"features": {
|
||||
"ghcr.io/devcontainers/features/node:1": {
|
||||
"version": "16"
|
||||
"version": "22"
|
||||
},
|
||||
"ghcr.io/devcontainers/features/rust:1": {}
|
||||
},
|
||||
@@ -27,8 +28,16 @@
|
||||
},
|
||||
"onCreateCommand": "bash .devcontainer/internal_dev/onCreateCommand.sh",
|
||||
"postCreateCommand": "bash .devcontainer/internal_dev/postCreateCommand.sh",
|
||||
"forwardPorts": [1080, 1433, 3306, 5432, 10000, 10001, 10002],
|
||||
"forwardPorts": [
|
||||
1080, 1433, 3306, 5432, 10000, 10001, 10002,
|
||||
4000, 4001, 33656, 33657, 44519, 44559,
|
||||
46273, 46274, 50024, 51822, 51823,
|
||||
54103, 61840, 61841, 62911, 62912
|
||||
],
|
||||
"portsAttributes": {
|
||||
"default": {
|
||||
"onAutoForward": "ignore"
|
||||
},
|
||||
"1080": {
|
||||
"label": "Mail Catcher",
|
||||
"onAutoForward": "notify"
|
||||
@@ -50,12 +59,76 @@
|
||||
"onAutoForward": "notify"
|
||||
},
|
||||
"10001": {
|
||||
"label": "Azurite Storage Queue ",
|
||||
"label": "Azurite Storage Queue",
|
||||
"onAutoForward": "notify"
|
||||
},
|
||||
"10002": {
|
||||
"label": "Azurite Storage Table",
|
||||
"onAutoForward": "notify"
|
||||
},
|
||||
"4000": {
|
||||
"label": "Api (Cloud)",
|
||||
"onAutoForward": "notify"
|
||||
},
|
||||
"4001": {
|
||||
"label": "Api (SelfHost)",
|
||||
"onAutoForward": "notify"
|
||||
},
|
||||
"33656": {
|
||||
"label": "Identity (Cloud)",
|
||||
"onAutoForward": "notify"
|
||||
},
|
||||
"33657": {
|
||||
"label": "Identity (SelfHost)",
|
||||
"onAutoForward": "notify"
|
||||
},
|
||||
"44519": {
|
||||
"label": "Billing",
|
||||
"onAutoForward": "notify"
|
||||
},
|
||||
"44559": {
|
||||
"label": "Scim",
|
||||
"onAutoForward": "notify"
|
||||
},
|
||||
"46273": {
|
||||
"label": "Events (Cloud)",
|
||||
"onAutoForward": "notify"
|
||||
},
|
||||
"46274": {
|
||||
"label": "Events (SelfHost)",
|
||||
"onAutoForward": "notify"
|
||||
},
|
||||
"50024": {
|
||||
"label": "Icons",
|
||||
"onAutoForward": "notify"
|
||||
},
|
||||
"51822": {
|
||||
"label": "Sso (Cloud)",
|
||||
"onAutoForward": "notify"
|
||||
},
|
||||
"51823": {
|
||||
"label": "Sso (SelfHost)",
|
||||
"onAutoForward": "notify"
|
||||
},
|
||||
"54103": {
|
||||
"label": "EventsProcessor",
|
||||
"onAutoForward": "notify"
|
||||
},
|
||||
"61840": {
|
||||
"label": "Notifications (Cloud)",
|
||||
"onAutoForward": "notify"
|
||||
},
|
||||
"61841": {
|
||||
"label": "Notifications (SelfHost)",
|
||||
"onAutoForward": "notify"
|
||||
},
|
||||
"62911": {
|
||||
"label": "Admin (Cloud)",
|
||||
"onAutoForward": "notify"
|
||||
},
|
||||
"62912": {
|
||||
"label": "Admin (SelfHost)",
|
||||
"onAutoForward": "notify"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ Press <Enter> to continue."
|
||||
fi
|
||||
|
||||
run_mssql_migrations="$(get_option "RUN_MSSQL_MIGRATIONS" "Would you like us to run MSSQL Migrations for you? [y/N] " "n")"
|
||||
if [[ "$do_azurite_setup" =~ ^([yY][eE][sS]|[yY])+$ ]]; then
|
||||
if [[ "$run_mssql_migrations" =~ ^([yY][eE][sS]|[yY])+$ ]]; then
|
||||
echo "Running migrations..."
|
||||
sleep 5 # wait for DB container to start
|
||||
dotnet run --project "$REPO_ROOT/util/MsSqlMigratorUtility" "$SQL_CONNECTION_STRING"
|
||||
|
||||
@@ -34,4 +34,5 @@ RABBITMQ_DEFAULT_PASS=SET_A_PASSWORD_HERE_123
|
||||
# SETUP_AZURITE=yes
|
||||
# RUN_MSSQL_MIGRATIONS=yes
|
||||
# DEV_CERT_PASSWORD=dev_cert_password_here
|
||||
# DEV_CERT_CONTENTS=base64_encoded_dev_pfx_here (alternative to placing dev.pfx file manually)
|
||||
# INSTALL_STRIPE_CLI=no
|
||||
|
||||
Reference in New Issue
Block a user