https://github.com/hackuna/one-cloud-s3-api
Easy to use REST API Gateway for 1CLOUD.RU object storage (S3). Based on Microsoft.NET.Sdk.Web, Amazon.S3.SDK, Swagger, OpenApi
https://github.com/hackuna/one-cloud-s3-api
1cloud asp-net-core aspnet-core aspnetcore csharp docker s3 s3-client swagger webapi
Last synced: 2 months ago
JSON representation
Easy to use REST API Gateway for 1CLOUD.RU object storage (S3). Based on Microsoft.NET.Sdk.Web, Amazon.S3.SDK, Swagger, OpenApi
- Host: GitHub
- URL: https://github.com/hackuna/one-cloud-s3-api
- Owner: hackuna
- License: gpl-3.0
- Created: 2022-04-30T05:31:27.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-03-27T15:11:04.000Z (over 2 years ago)
- Last Synced: 2024-03-28T16:11:48.929Z (over 2 years ago)
- Topics: 1cloud, asp-net-core, aspnet-core, aspnetcore, csharp, docker, s3, s3-client, swagger, webapi
- Language: C#
- Homepage: https://1cloud.ru/ref/339507
- Size: 61.5 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE.txt
Awesome Lists containing this project
README
# 1cloud S3 API
An example of interaction with cloud object storage from [1cloud.ru](https://1cloud.ru/ref/339507) using the Amazon S3 protocol, using C# and .NET 8.
## Configuration
### Environment variables:
```
S3_SERVICE_URL=https://1cloud.store
S3_ACCESS_KEY={YourAccessKey}
S3_SECRET_KEY={YourSecretKey}
```
### Local development in IDE
Configure Environment variables at `"environmentVariables"` section in file `Properties/launchSettings.json`
```
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"S3_SERVICE_URL": "https://1cloud.store",
"S3_ACCESS_KEY": "{YourDevAccessKey}",
"S3_SECRET_KEY": "{YourDevSecretKey}"
}
```
## Docker image (linux-x64)
| Container image repository | Last Build |
| -- | -- |
| [ghcr.io/hackuna/one-cloud-s3-api](https://github.com/hackuna/one-cloud-s3-api/pkgs/container/one-cloud-s3-api) | [](https://github.com/hackuna/one-cloud-s3-api/actions/workflows/dotnet.yml) |
Pull image command:
```
docker pull ghcr.io/hackuna/one-cloud-s3-api:latest
```
Run container command:
```
docker run -d \
--restart always \
--name storage-api \
-p 5000:8080 \
--volume=storage-secrets:/root/.aspnet/DataProtection-Keys \
--env=ASPNETCORE_ENVIRONMENT=Production \
--env=ASPNETCORE_URLS=http://+:8080 \
--env=S3_SERVICE_URL=https://1cloud.store \
--env=S3_ACCESS_KEY={YourAccessKey} \
--env=S3_SECRET_KEY={YourSecretKey} \
ghcr.io/hackuna/one-cloud-s3-api:latest
```
Stop container command:
```
docker stop storage-api
```
Remove container command:
```
docker rm storage-api
```