https://github.com/voltstro/verdaccio-az-storage
Azure Storage plugin for Verdaccio
https://github.com/voltstro/verdaccio-az-storage
azure blob plugin storage verdaccio
Last synced: 3 months ago
JSON representation
Azure Storage plugin for Verdaccio
- Host: GitHub
- URL: https://github.com/voltstro/verdaccio-az-storage
- Owner: Voltstro
- License: mit
- Created: 2024-08-07T07:17:17.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-08-09T04:26:57.000Z (about 1 year ago)
- Last Synced: 2024-08-09T11:22:09.330Z (about 1 year ago)
- Topics: azure, blob, plugin, storage, verdaccio
- Language: TypeScript
- Homepage:
- Size: 66.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# verdaccio-az-storage
[](https://github.com/Voltstro/verdaccio-az-storage/blob/master/LICENSE.md)
[](https://www.npmjs.com/package/verdaccio-az-storage)
[](https://discord.voltstro.dev)
[](https://www.youtube.com/Voltstro)
[Azure Storage](https://learn.microsoft.com/en-us/azure/storage/common/storage-introduction) plugin for [Verdaccio 6](https://verdaccio.org/).
## Features
- Stores packages and its data in an Azure Storage container
- Cache control settings
- Optionally, store verdaccio's database in Azure App Configuration
## Getting Started
### Prerequisites
- An Azure Storage account with a container
- Verdaccio 6
### Install
Install like any other verdaccio plugin.
```bash
npm install verdaccio-az-storage
```
### Configuration
To use this plugin, you will need to add the plugin to your verdaccio's config store option.
```yaml
store:
az-storage:
# (Required) Connection string for the Azure storage account, can also be set by AZ_STORAGE_CONNECTION_STRING environment variable
connectionString:
# (Required) Name of the container inside of the storage account
containerName: example
# (Optional, default 'packages') Directory in the container to store the packages in
packagesDir: packages
# (Optional) Cache control time (in seconds) for the package data (package.json file)
cachePackageDataTime:
# (Optional) Cache control time (in seconds) for the package it self (tar file)
cachePackageTime:
# (Optional) Connection string for the Azure app configuration, can also be set by AZ_STORAGE_APP_CONFIG_CONNECTION_STRING
appConfigConnectionString:
# (Optional, default 'verdaccio-db') Key name for the value store in app configuration
appConfigKeyName: verdaccio-db
```
### Development
To contribute to this project pull the repo.
#### Dev Containers
Make sure you have Docker / Podman installed. If you are wishing to use AZ CLI context for authentication, you have 2 options:
1) Configure ./devcontainers/.env with your development Azure Subscription ID as below and your local AZ CLI context will be copied into the devcontainer and made active.
```bash
expected_az_context="00000000-0000-0000-0000-000000000000"
```
2) Load devcontainer as per usual and login locally within the devcontainer.
#### Local
1) We use pnpm for package management. Install all packages using install.
```
pnpm install
```
2) Either build the project using the build script, or use VSCode's Run and Debug (which will build the project and have debugging support).
## Authors
* **Voltstro** - *Initial work* - [Voltstro](https://github.com/Voltstro)
## Thanks
- [verdaccio-aws-s3-storage](https://www.npmjs.com/package/verdaccio-aws-s3-storage) - Provided base example on developing a storage plugin for Verdaccio