Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ To run this prebuilt project, you will need:

- [Couchbase Capella](https://www.couchbase.com/products/capella/) cluster with [travel-sample](https://docs.couchbase.com/dotnet-sdk/current/ref/travel-app-data-model.html) bucket loaded.
- To run this tutorial using a self managed Couchbase cluster, please refer to the [appendix](#running-self-managed-couchbase-cluster).
- [.NET SDK v6+](https://dotnet.microsoft.com/en-us/download/dotnet) installed.
- [.NET SDK v8+](https://dotnet.microsoft.com/en-us/download/dotnet) installed.
- Ensure that the .Net version is [compatible](https://docs.couchbase.com/dotnet-sdk/current/project-docs/compatibility.html#dotnet-compatibility) with the Couchbase SDK.
- Code Editor installed (Visual Studio Professional, Visual Studio Code, or JetBrains Rider)
- Loading Travel Sample Bucket
Expand Down Expand Up @@ -53,7 +53,7 @@ Specifically, you need to do the following:
- Create the [database credentials](https://docs.couchbase.com/cloud/clusters/manage-database-users.html) to access the travel-sample bucket (Read and Write) used in the application.
- [Allow access](https://docs.couchbase.com/cloud/clusters/allow-ip-address.html) to the Cluster from the IP on which the application is running.

All configuration for communication with the database is stored in the [appsettings.Development.json](https://github.com/couchbase-examples/aspnet-quickstart/blob/main/src/Org.Quickstart.API/appsettings.Development.json) file. This includes the connection string, username, password, bucket name and scope name. The default username is assumed to be `Administrator` and the default password is assumed to be `P@$$w0rd12`. If these are different in your environment you will need to change them before running the application.
The application reads Couchbase settings from [appsettings.Development.json](https://github.com/couchbase-examples/aspnet-quickstart/blob/main/src/Org.Quickstart.API/appsettings.Development.json) and lets you override the connection string, username, and password with the `DB_CONN_STR`, `DB_USERNAME`, and `DB_PASSWORD` environment variables. The current startup code applies the override only when all three environment variables are set together; otherwise it falls back to the checked-in local-development placeholders.

```json
"Couchbase": {
Expand All @@ -69,6 +69,14 @@ All configuration for communication with the database is stored in the [appsetti

```

For local or CI runs, you can keep secrets out of the tracked config file by exporting environment variables instead:

```sh
export DB_CONN_STR="couchbase://localhost"
export DB_USERNAME="Administrator"
export DB_PASSWORD="P@ssw0rd12"
```

> Note: The connection string expects the `couchbases://` or `couchbase://` part.

## Running The Application
Expand Down
8 changes: 4 additions & 4 deletions src/Org.Quickstart.API/Org.Quickstart.API.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
</PropertyGroup>
<PropertyGroup Condition=" '$(RunConfiguration)' == 'Org.Quickstart.API' " />
<ItemGroup>
<PackageReference Include="Couchbase.Transactions" Version="3.6.2" />
<PackageReference Include="Couchbase.Transactions" Version="3.9.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
<PackageReference Include="BCrypt.Net-Next" Version="4.0.3" />
<PackageReference Include="CouchbaseNetClient" Version="3.6.2" />
<PackageReference Include="Couchbase.Extensions.DependencyInjection" Version="3.6.1" />
<PackageReference Include="BCrypt.Net-Next" Version="4.1.0" />
<PackageReference Include="CouchbaseNetClient" Version="3.9.1" />
<PackageReference Include="Couchbase.Extensions.DependencyInjection" Version="3.9.1" />
<PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="8.1.1" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="xunit" Version="2.9.2" />
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
Expand All @@ -26,7 +26,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Org.Quickstart.API\Org.Quickstart.API.csproj" />
Expand Down
Loading