Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,20 @@ The Umbraco CMS and public API for [MethodConf](https://www.methodconf.com/).
## Local Development

1. Copy `.env.example` to `.env` and configure the required values.
2. Run the application:
2. Start local S3 media storage:

```bash
dotnet run --project src/MethodConf.Cms/MethodConf.Cms.csproj
docker compose up -d seaweedfs
```

3. Run the application:

```bash
dotnet run --project src/MethodConf.Cms/MethodConf.Cms.csproj --launch-profile Umbraco.Web.UI
```

Local media uses SeaweedFS at `http://localhost:8334` with disposable development credentials.

The production image can be built locally with:

```bash
Expand Down
22 changes: 21 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
services:
seaweedfs:
image: chrislusf/seaweedfs:4.48@sha256:4e61d15fd35994cb1e43e1e553dff106794841fd9a99ade2fc8c8bfce4d7872d
command: [mini, -dir=/data]
environment:
AWS_ACCESS_KEY_ID: methodconf-local
AWS_SECRET_ACCESS_KEY: methodconf-local-password
S3_BUCKET: methodconf-local
ports:
- '127.0.0.1:8334:8333'
volumes:
- 'seaweedfs-data:/data'
backend:
build:
context: ./
Expand All @@ -7,9 +18,17 @@ services:
- '${APP_PORT:-8080}:8080'
env_file:
- .env
environment:
AWS_ACCESS_KEY_ID: methodconf-local
AWS_SECRET_ACCESS_KEY: methodconf-local-password
AWS_SESSION_TOKEN: ""
AWS__ServiceURL: http://seaweedfs:8333
AWS__ForcePathStyle: "true"
Umbraco__Storage__AWSS3__Media__BucketName: methodconf-local
depends_on:
- seaweedfs
volumes:
- './src/MethodConf.Cms/umbraco/Data/Umbraco.sqlite.db:/app/umbraco/Data/Umbraco.sqlite.db'
- './src/MethodConf.Cms/wwwroot/media:/app/wwwroot/media'
- 'cache:/app/umbraco/Data/TEMP'
- 'data-protection-keys:/home/app/.aspnet/DataProtection-Keys'
restart: unless-stopped
Expand Down Expand Up @@ -37,5 +56,6 @@ services:
profiles: [ local-email ]

volumes:
seaweedfs-data:
cache:
data-protection-keys:
2 changes: 2 additions & 0 deletions src/MethodConf.Cms/MethodConf.Cms.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AF.Umbraco.S3.Media.Storage" Version="1.4.2" />
<PackageReference Include="AWSSDK.SecurityToken" Version="4.0.101.1" />
<PackageReference Include="FluentResults" Version="4.0.0" />
<PackageReference Include="MimeKit" Version="4.18.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="10.0.12">
Expand Down
10 changes: 8 additions & 2 deletions src/MethodConf.Cms/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
"ASPNETCORE_ENVIRONMENT": "Development",
"AWS_ACCESS_KEY_ID": "methodconf-local",
"AWS_SECRET_ACCESS_KEY": "methodconf-local-password",
"AWS_SESSION_TOKEN": ""
}
},
"Umbraco.Web.UI": {
Expand All @@ -22,7 +25,10 @@
"launchBrowser": true,
"applicationUrl": "https://localhost:44350;http://localhost:7158",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
"ASPNETCORE_ENVIRONMENT": "Development",
"AWS_ACCESS_KEY_ID": "methodconf-local",
"AWS_SECRET_ACCESS_KEY": "methodconf-local-password",
"AWS_SESSION_TOKEN": ""
}
}
}
Expand Down
11 changes: 11 additions & 0 deletions src/MethodConf.Cms/appsettings.Development.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{
"$schema": "appsettings-schema.json",
"AWS": {
"ServiceURL": "http://localhost:8334",
"ForcePathStyle": true
},
"Serilog": {
"MinimumLevel": {
"Default": "Information"
Expand All @@ -14,6 +18,13 @@
]
},
"Umbraco": {
"Storage": {
"AWSS3": {
"Media": {
"BucketName": "methodconf-local"
}
}
},
"CMS": {
"Content": {
"MacroErrors": "Throw"
Expand Down
16 changes: 16 additions & 0 deletions src/MethodConf.Cms/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,23 @@
"umbracoDbDSN": "",
"umbracoDbDSN_ProviderName": "Microsoft.Data.Sqlite"
},
"AWS": {
"Region": "us-east-2"
},
"Umbraco": {
"Storage": {
"AWSS3": {
"Media": {
"BucketName": "",
"Region": "us-east-2",
"MediaBucketPrefix": "media",
"CacheBucketPrefix": "cache",
"CacheRetention": {
"Enabled": false
}
}
}
},
"CMS": {
"Global": {
"Id": "1569bc40-73b7-4d61-943f-0ee19fd6c39c"
Expand Down
Loading