forked from loic-sharma/BaGet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Overhaul BaGet's documentation (loic-sharma#324)
- Loading branch information
1 parent
2a9ce61
commit 2c27656
Showing
14 changed files
with
412 additions
and
246 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,71 +1,13 @@ | ||
# BaGet | ||
|
||
## Getting Started | ||
BaGet (pronounced "baguette") is a lightweight NuGet and symbol server. It is [open source](https://github.com/loic-sharma/BaGet), cross-platform, and cloud ready! | ||
|
||
1. Install [.NET Core SDK](https://www.microsoft.com/net/download) | ||
2. Download and extract [BaGet's latest release](https://github.com/loic-sharma/BaGet/releases) | ||
3. Start the service with `dotnet BaGet.dll` | ||
4. Browse `http://localhost:5000/` in your browser | ||
## Run BaGet | ||
|
||
## Pushing Packages | ||
You can run BaGet on your preferred platform: | ||
|
||
You can push a package using this command: | ||
|
||
``` | ||
dotnet nuget push -s http://localhost:5000/v3/index.json newtonsoft.json.11.0.2.nupkg | ||
``` | ||
|
||
## Using BaGet as a Symbol Server | ||
|
||
You can use BaGet as a Symbol Server by uploading | ||
[symbol packages](https://docs.microsoft.com/en-us/nuget/create-packages/symbol-packages-snupkg). | ||
After you've pushed a package to BaGet, you can push its corresponding | ||
symbol package using this command: | ||
|
||
``` | ||
dotnet nuget push -s http://localhost:5000/v3/index.json symbol.package.1.0.0.snupkg | ||
``` | ||
|
||
You will need to add the symbol location `http://localhost:5000/api/download/symbols` to load symbols from BaGet. | ||
[Use this guide](https://docs.microsoft.com/en-us/visualstudio/debugger/specify-symbol-dot-pdb-and-source-files-in-the-visual-studio-debugger?view=vs-2017#configure-symbol-locations-and-loading-options) for Visual Studio. | ||
|
||
## Running BaGet on Docker | ||
|
||
If you'd like, you can run BaGet on Docker: | ||
|
||
1. Pull the latest [docker image](https://hub.docker.com/r/loicsharma/baget): | ||
|
||
``` | ||
docker pull loicsharma/baget | ||
``` | ||
|
||
2. Create a file named `baget.env` with the content: | ||
|
||
``` | ||
ApiKey=NUGET-SERVER-API-KEY | ||
Storage__Type=FileSystem | ||
Storage__Path=/var/baget/packages | ||
Database__Type=Sqlite | ||
Database__ConnectionString=Data Source=/var/baget/baget.db | ||
Search__Type=Database | ||
``` | ||
|
||
!!! info | ||
The `baget.env` file stores [BaGet's configuration](configuration) as environment | ||
variables. To learn how these configurations work, please refer to | ||
[ASP.NET Core's Configuration documentation](https://docs.microsoft.com/en-us/aspnet/core/fundamentals/configuration/?view=aspnetcore-2.1&tabs=basicconfiguration#configuration-by-environment). | ||
|
||
3. Create a folder named `baget-data` | ||
4. Run: | ||
|
||
``` | ||
docker run --rm --name nuget-server -p 5555:80 --env-file baget.env -v "$(pwd)/baget-data:/var/baget" loicsharma/baget:latest | ||
``` | ||
|
||
5. Push your first package with: | ||
|
||
``` | ||
dotnet nuget push -s http://localhost:5555/v3/index.json -k NUGET-SERVER-API-KEY newtonsoft.json.11.0.2.nupkg | ||
``` | ||
|
||
6. Open the URL `http://localhost:5555/` in your browser | ||
* [On your computer](quickstart/local.md) | ||
* [Docker](quickstart/docker.md) | ||
* [Azure](quickstart/azure.md) | ||
* [AWS](quickstart/aws.md) | ||
* [Google Cloud](quickstart/gcp.md) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
# Run BaGet on AWS | ||
|
||
!!! warning | ||
This page is a work in progress! | ||
|
||
Use Amazon Web Services to scale BaGet. You can store metadata on [Amazon RDS](https://aws.amazon.com/rds/postgresql/) and upload packages to [Amazon S3](https://aws.amazon.com/s3/). | ||
|
||
## Configure BaGet | ||
|
||
You can modify BaGet's configurations by editing the `appsettings.json` file. For the full list of configurations, please refer to [BaGet's configuration](../configuration.md) guide. | ||
|
||
### Amazon S3 | ||
|
||
Update the `appsettings.json` file: | ||
|
||
```json | ||
{ | ||
... | ||
|
||
"Storage": { | ||
"Type": "AwsS3", | ||
"Region": "us-west-1", | ||
"Bucket": "foo", | ||
"AccessKey": "", | ||
"SecretKey": "" | ||
}, | ||
|
||
... | ||
} | ||
``` | ||
|
||
### Amazon RDS | ||
|
||
To use PostgreSQL, update the `appsettings.json` file: | ||
|
||
```json | ||
{ | ||
... | ||
|
||
"Database": { | ||
"Type": "PostgreSql", | ||
"ConnectionString": "..." | ||
}, | ||
|
||
... | ||
} | ||
``` | ||
|
||
To use MySQL, update the `appsettings.json` file: | ||
|
||
```json | ||
{ | ||
... | ||
|
||
"Database": { | ||
"Type": "MySql", | ||
"ConnectionString": "..." | ||
}, | ||
|
||
... | ||
} | ||
``` | ||
|
||
## Publish Packages | ||
|
||
Publish your first package with: | ||
|
||
``` | ||
dotnet nuget push -s http://localhost:5000/v3/index.json package.1.0.0.nupkg | ||
``` | ||
|
||
Publish your first [symbol package](https://docs.microsoft.com/en-us/nuget/create-packages/symbol-packages-snupkg) with: | ||
|
||
``` | ||
dotnet nuget push -s http://localhost:5000/v3/index.json symbol.package.1.0.0.snupkg | ||
``` | ||
|
||
!!! warning | ||
You should secure your server by requiring an API Key to publish packages. For more information, please refer to the [Require an API Key](../configuration.md#require-an-api-key) guide. | ||
|
||
## Restore Packages | ||
|
||
You can restore packages by using the following package source: | ||
|
||
`http://localhost:5000/v3/index.json` | ||
|
||
Some helpful guides: | ||
|
||
* [Visual Studio](https://docs.microsoft.com/en-us/nuget/consume-packages/install-use-packages-visual-studio#package-sources) | ||
* [NuGet.config](https://docs.microsoft.com/en-us/nuget/reference/nuget-config-file#package-source-sections) | ||
|
||
## Symbol Server | ||
|
||
You can load symbols by using the following symbol location: | ||
|
||
`http://localhost:5000/api/download/symbols` | ||
|
||
For Visual Studio, please refer to the [Configure Debugging](https://docs.microsoft.com/en-us/visualstudio/debugger/specify-symbol-dot-pdb-and-source-files-in-the-visual-studio-debugger?view=vs-2017#configure-symbol-locations-and-loading-options) guide. |
Oops, something went wrong.