Browse Source

Codespaces improvements (#4969)

* Skip one_time_setup in GH Codespaces

* Make .env File Optional

* Wrap Path in Single Quotes

* Comment out .env File

* Add Modify Database Task

* Work on modify_database.ps1

* Add space

* Remove compose version

* Do changes in community as well

* Do required: false

* Reverse check

* Remove printenv

* Skip DB changes

* Remove docker outside of docker feature

* Remove newlines
PM-18881
Justin Baur 9 months ago committed by GitHub
parent
commit
bd7a0a8ed8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 5
      .devcontainer/bitwarden_common/docker-compose.yml
  2. 8
      .devcontainer/community_dev/postCreateCommand.sh
  3. 2
      .devcontainer/internal_dev/docker-compose.override.yml
  4. 8
      .devcontainer/internal_dev/postCreateCommand.sh

5
.devcontainer/bitwarden_common/docker-compose.yml

@ -1,5 +1,3 @@ @@ -1,5 +1,3 @@
version: '3'
services:
bitwarden_server:
image: mcr.microsoft.com/devcontainers/dotnet:8.0
@ -13,7 +11,8 @@ services: @@ -13,7 +11,8 @@ services:
platform: linux/amd64
restart: unless-stopped
env_file:
../../dev/.env
- path: ../../dev/.env
required: false
environment:
ACCEPT_EULA: "Y"
MSSQL_PID: Developer

8
.devcontainer/community_dev/postCreateCommand.sh

@ -51,4 +51,10 @@ Proceed? [y/N] " response @@ -51,4 +51,10 @@ Proceed? [y/N] " response
}
# main
one_time_setup
if [[ -z "${CODESPACES}" ]]; then
one_time_setup
else
# Ignore interactive elements when running in codespaces since they are not supported there
# TODO Write codespaces specific instructions and link here
echo "Running in codespaces, follow instructions here: https://contributing.bitwarden.com/getting-started/server/guide/ to continue the setup"
fi

2
.devcontainer/internal_dev/docker-compose.override.yml

@ -1,5 +1,3 @@ @@ -1,5 +1,3 @@
version: '3'
services:
bitwarden_storage:
image: mcr.microsoft.com/azure-storage/azurite:latest

8
.devcontainer/internal_dev/postCreateCommand.sh

@ -89,4 +89,10 @@ install_stripe_cli() { @@ -89,4 +89,10 @@ install_stripe_cli() {
}
# main
one_time_setup
if [[ -z "${CODESPACES}" ]]; then
one_time_setup
else
# Ignore interactive elements when running in codespaces since they are not supported there
# TODO Write codespaces specific instructions and link here
echo "Running in codespaces, follow instructions here: https://contributing.bitwarden.com/getting-started/server/guide/ to continue the setup"
fi
Loading…
Cancel
Save