mirror of
https://github.com/bitwarden/self-host.git
synced 2026-06-27 22:05:45 +00:00
Add tests and formatting, update README while we are here
This commit is contained in:
29
.github/workflows/build-bwsh.yml
vendored
29
.github/workflows/build-bwsh.yml
vendored
@@ -6,11 +6,13 @@ on:
|
||||
push:
|
||||
paths:
|
||||
- "POC/bwsh/**"
|
||||
- "POC/bwsh.Test/**"
|
||||
- ".github/workflows/build-bwsh.yml"
|
||||
pull_request:
|
||||
types: [opened, synchronize]
|
||||
paths:
|
||||
- "POC/bwsh/**"
|
||||
- "POC/bwsh.Test/**"
|
||||
- ".github/workflows/build-bwsh.yml"
|
||||
workflow_dispatch: {}
|
||||
|
||||
@@ -21,8 +23,35 @@ concurrency:
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Lint and test
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 15
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Set up .NET
|
||||
uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5.3.0
|
||||
with:
|
||||
dotnet-version: "10.0.x"
|
||||
|
||||
- name: Check formatting
|
||||
run: |
|
||||
dotnet format POC/bwsh/Bwsh.csproj --verify-no-changes
|
||||
dotnet format POC/bwsh.Test/Bwsh.Test.csproj --verify-no-changes
|
||||
|
||||
- name: Run unit tests
|
||||
working-directory: POC/bwsh.Test
|
||||
run: dotnet test --configuration Release
|
||||
|
||||
build:
|
||||
name: Build (${{ matrix.rid }})
|
||||
needs: test
|
||||
runs-on: ${{ matrix.runner }}
|
||||
timeout-minutes: 15
|
||||
permissions:
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using System.CommandLine;
|
||||
using Bit.SelfHost.Deployments;
|
||||
using Bit.SelfHost.Engine;
|
||||
using Spectre.Console;
|
||||
|
||||
namespace Bit.SelfHost.Commands;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace Bit.SelfHost.Engine;
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
# bwsh — Bitwarden self-host CLI
|
||||
|
||||
A single .NET tool that installs and manages a Bitwarden self-host deployment — replacing the
|
||||
`bitwarden.sh` + `run.sh` + Setup-container stack. It generates all config in-process and drives
|
||||
Docker directly. Supports both **standard** and **lite** deployments.
|
||||
`bitwarden.sh` + `run.sh` + Setup-container stack. It generates config in-process and brings the
|
||||
stack up: **standard** drives the Docker Engine API directly, while **lite** runs the repo's
|
||||
`bitwarden-lite/docker-compose.yml` via `docker compose`.
|
||||
|
||||

|
||||
|
||||
@@ -11,7 +12,7 @@ Docker directly. Supports both **standard** and **lite** deployments.
|
||||
## Prerequisites
|
||||
|
||||
- **.NET 10 SDK** — https://dotnet.microsoft.com/download
|
||||
- **Docker** running
|
||||
- **Docker** running (lite deployments also need the `docker compose` CLI plugin)
|
||||
- An installation **ID + key** from https://bitwarden.com/host
|
||||
|
||||
## Install
|
||||
@@ -104,7 +105,8 @@ ssl:
|
||||
`install`/`apply` then provisions the cert with certbot. Renew with `dotnet run -- renewcert` (cron it for
|
||||
auto-renewal).
|
||||
|
||||
Ports default to 80/443; override with `http-port`/`https-port` in the manifest. Opt out of HTTPS with
|
||||
Ports default to 80/443. On standard, override with `http-port`/`https-port` in the manifest; lite
|
||||
serves on 80/443 from the upstream compose and ignores those fields. Opt out of HTTPS with
|
||||
`ssl: { enable: false }`.
|
||||
|
||||
## Shell completion
|
||||
|
||||
Reference in New Issue
Block a user