1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-05 05:00:19 -05:00
bitwarden/dev/add-dc-profile.sh
2025-03-21 16:51:02 -04:00

23 lines
829 B
Bash

#!/usr/bin/env bash
if [[ -z "${CODESPACES}" ]]; then
if [[ -z "${HOSTNAME}" ]]; then
# Add docker compose profile using local strategy
echo "Locally"
# No need to patch it into another compose project when ran locally
docker compose --profile "$1" up -d
else
# Add docker compose profile to dev container
# Is this definitely always the same thing as codespaces?
echo "In DevContainer"
source_dir="$( dirname "${BASH_SOURCE[0]}")"
echo $source_dir
docker compose -p bitwarden_common --profile "$1" -f "${source_dir}/docker-compose.yml" up -d
fi
else
# Add docker compose profile to codespace
echo "In Codespaces"
source_dir="$( dirname "${BASH_SOURCE[0]}")"
echo $source_dir
docker compose -p bitwarden_common --profile "$1" -f "${source_dir}/docker-compose.yml" up -d
fi