Skip to content

Commit d0e57b4

Browse files
authored
Merge pull request #4 from jcdcdev/dev
0.1.1
2 parents 5db842a + 425af5a commit d0e57b4

File tree

10 files changed

+6688
-6667
lines changed

10 files changed

+6688
-6667
lines changed

.github/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ services:
6464
environment:
6565
- SERVICES=s3
6666
- DEBUG=1
67-
- AWS_ACCESS_KEY_ID=test
68-
- AWS_SECRET_ACCESS_KEY=test
67+
- AWS_ACCESS_KEY_ID=test-id
68+
- AWS_SECRET_ACCESS_KEY=test-key
6969
volumes:
7070
- ./s3:/persisted-data/
7171
- ./aws:/etc/localstack/init/ready.d

docs/healthchecks.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Health Checks
2+
3+
The package includes a suite of health checks to verify the connection to the S3 compatible bucket.
4+
5+
## BucketName
6+
7+
The name of the bucket to use for the S3 compatible service.
8+
9+
Media will be stored withing this bucket under the prefix `media/`.
10+
Cached image crops will be stored within this bucket under the prefix `cache/`.
11+
12+
## ApplicationKey
13+
14+
Also known as `Access Secret` this is your secret key used to authenticate with the S3 compatible service.
15+
16+
## KeyId
17+
18+
Also known as `Access Key` this is your public key used to authenticate with the S3 compatible service.
19+
20+
## ServiceUrl
21+
22+
The URL of the S3 compatible service.
23+
24+
## Api
25+
26+
1. Ensure the bucket exists
27+
2. Ensure the Application Key and Key Id are valid
28+
- Check the Application Key has read and write permissions to the bucket
29+
3. Ensure the Service URL is valid
30+
31+
If you can confirm the S3 compatible bucket is accessible but the health check is failing, please raise an [issue](https://github.com/jcdcdev/Umbraco.Community.FileSystemProviders.B2/issues/new?assignees=&labels=bug&projects=&template=bug.yml)

src/TestSite.10/appsettings.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
"ServiceUrl": "http://localhost:4566",
1919
"UseAccelerateEndpoint": false,
2020
"Credentials": {
21-
"ApplicationKey": "test",
22-
"KeyId": "test"
21+
"ApplicationKey": "test-key",
22+
"KeyId": "test-id"
2323
}
2424
}
2525
}
@@ -37,4 +37,4 @@
3737
}
3838
}
3939
}
40-
}
40+
}

src/TestSite.12/appsettings.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
"ServiceUrl": "http://localhost:4566",
1919
"UseAccelerateEndpoint": false,
2020
"Credentials": {
21-
"ApplicationKey": "test",
22-
"KeyId": "test"
21+
"ApplicationKey": "test-key",
22+
"KeyId": "test-id"
2323
}
2424
}
2525
}
@@ -37,4 +37,4 @@
3737
}
3838
}
3939
}
40-
}
40+
}

src/TestSite.13/appsettings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
"ServiceUrl": "http://localhost:4566",
1919
"UseAccelerateEndpoint": false,
2020
"Credentials": {
21-
"ApplicationKey": "test",
22-
"KeyId": "test"
21+
"ApplicationKey": "test-key",
22+
"KeyId": "test-id"
2323
}
2424
}
2525
}

src/Umbraco.Community.FileSystemProviders.B2/Constants.cs

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@ public class Constants
66

77
public class HealthChecks
88
{
9+
public const string DocsLink = "https://github.com/jcdcdev/Umbraco.Community.FileSystemProviders.B2/blob/main/docs/healthchecks.md";
10+
911
public class BucketName
1012
{
1113
public const string Id = "D4D3D3D3-4D3D-4D3D-4D3D-4D3D3D3D3D3D";
1214
public const string Name = "B2 Bucket Name";
1315
public const string Description = "Checks if the B2 bucket name is set.";
1416
public const string ItemPath = $"{Section}:BucketName";
15-
public const string ReadMoreLink = "https://our.umbraco.com/Documentation/Extending/FileSystemProviders/B2/";
17+
public const string ReadMoreLink = $"{DocsLink}#bucketname";
1618
}
1719

1820
public class ApplicationKey
@@ -21,7 +23,7 @@ public class ApplicationKey
2123
public const string Name = "B2 Secret Key";
2224
public const string Description = "Checks if the B2 secret key is set.";
2325
public const string ItemPath = $"{Section}:Credentials:KeyId";
24-
public const string ReadMoreLink = "https://our.umbraco.com/Documentation/Extending/FileSystemProviders/B2/";
26+
public const string ReadMoreLink = $"{DocsLink}#applicationkey";
2527
}
2628

2729
public class KeyId
@@ -30,7 +32,7 @@ public class KeyId
3032
public const string Name = "B2 Access Key";
3133
public const string Description = "Checks if the B2 access key is set.";
3234
public const string ItemPath = $"{Section}:Credentials:ApplicationKey";
33-
public const string ReadMoreLink = "https://our.umbraco.com/Documentation/Extending/FileSystemProviders/B2/";
35+
public const string ReadMoreLink = $"{DocsLink}#keyid";
3436
}
3537

3638
public class ServiceUrl
@@ -39,24 +41,15 @@ public class ServiceUrl
3941
public const string Name = "B2 Service Url";
4042
public const string Description = "Checks if the B2 service URL is set.";
4143
public const string ItemPath = $"{Section}:ServiceUrl";
42-
public const string ReadMoreLink = "https://our.umbraco.com/Documentation/Extending/FileSystemProviders/B2/";
43-
}
44-
45-
public class UseAccelerateEndpoint
46-
{
47-
public const string Id = "9D3D3D3D-4D3D-4D3D-4D3D-4D3D3D3D3D3D";
48-
public const string Name = "B2 Use Accelerate Endpoint";
49-
public const string Description = "Checks if the B2 use accelerate endpoint is set.";
50-
public const string ItemPath = $"{Section}:UseAccelerateEndpoint";
51-
public const string ReadMoreLink = "https://our.umbraco.com/Documentation/Extending/FileSystemProviders/B2/";
44+
public const string ReadMoreLink = $"{DocsLink}#serviceurl";
5245
}
5346

5447
public class Api
5548
{
5649
public const string Id = "8D3D3D3D-4D3D-4D3D-4D3D-4D3D3D3D3D3D";
5750
public const string Name = "B2 API";
5851
public const string Description = "Checks if the B2 API is healthy.";
59-
public const string ReadMoreLink = "https://our.umbraco.com/Documentation/Extending/FileSystemProviders/B2/";
52+
public const string ReadMoreLink = $"{DocsLink}#api";
6053
}
6154

6255
public class Groups

src/Umbraco.Community.FileSystemProviders.B2/Models/B2Options.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ public class B2Options
1313
[MemberNotNullWhen(true, nameof(ServiceUrl), nameof(Credentials))]
1414
public bool Enabled => !string.IsNullOrWhiteSpace(BucketName) && !string.IsNullOrWhiteSpace(ServiceUrl) && (Credentials?.Valid ?? false);
1515

16-
public AWSCredentials ToCredentials() => new BasicAWSCredentials(Credentials?.KeyId, Credentials?.KeyId);
16+
public AWSCredentials ToCredentials() => new BasicAWSCredentials(Credentials?.KeyId, Credentials?.ApplicationKey);
1717
}

src/Umbraco.Community.FileSystemProviders.B2/Umbraco.Community.FileSystemProviders.B2.csproj

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
<PackageReference Include="Umbraco.Cms.Web.BackOffice" Version="[10.4.0,11.0.0)"/>
3131
<PackageReference Include="Umbraco.Cms.Web.Common" Version="[10.4.0,11.0.0)"/>
3232
<PackageReference Include="Our.Umbraco.StorageProviders.AWSS3" Version="1.3.0"/>
33-
3433
</ItemGroup>
3534

3635
<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'">
@@ -39,7 +38,6 @@
3938
<PackageReference Include="Umbraco.Cms.Web.Common" Version="[11.0.0,13.0.0)"/>
4039
<PackageReference Include="Umbraco.Cms.Imaging.ImageSharp" Version="[11.0.0,13.0.0)"/>
4140
<PackageReference Include="Our.Umbraco.StorageProviders.AWSS3" Version="1.3.0"/>
42-
4341
</ItemGroup>
4442

4543
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
@@ -48,7 +46,6 @@
4846
<PackageReference Include="Umbraco.Cms.Web.Common" Version="[13.0.0,14.0.0)"/>
4947
<PackageReference Include="Umbraco.Cms.Imaging.ImageSharp" Version="[13.0.0,14.0.0)"/>
5048
<PackageReference Include="Our.Umbraco.StorageProviders.AWSS3" Version="1.3.0"/>
51-
5249
</ItemGroup>
5350

5451
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
@@ -61,4 +58,4 @@
6158
<None Include="..\..\docs\icon.png" Pack="true" PackagePath="images\icon.png"/>
6259
<None Include="..\..\.github\README.md" Pack="true" PackagePath="\"/>
6360
</ItemGroup>
64-
</Project>
61+
</Project>

0 commit comments

Comments
 (0)