/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

Primary LanguageC#GNU General Public License v3.0GPL-3.0

1cloud S3 API

An example of interaction with cloud object storage from 1cloud.ru 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 Build & Publish

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