diff --git a/README.md b/README.md index 80c40c695..263320f1e 100644 --- a/README.md +++ b/README.md @@ -4,17 +4,17 @@ A personal blog system that optimized for [**Microsoft Azure**](https://azure.microsoft.com/en-us/). Designed for developers, enabling most common blogging features including posts, comments, categories, archive, tags and pages. -## 📦 Deployment +## 📦 Deployment Notice - Use stable code from [Release](https://github.com/EdiWang/Moonglade/releases) branch rather than master branch. -- HTTPS is required, and it is recommended to enable HTTP/2 support on your web server. +- It is recommended to enable HTTPS and HTTP/2 support on your web server. -### Full Deploy on Azure +- Azure is recommended for deployment, but you can also deploy it on any other cloud provider or pure on-premises without any cloud. -This is the way https://edi.wang is deployed, by taking advantage of as many Azure services as possible, the blog can run very fast and secure. +### Full Deploy on Azure -There is no automated script to deploy it, you need to manually create all the resources. +This is the way https://edi.wang is deployed, by taking advantage of as many Azure services as possible, the blog can run very fast and secure. There is no automated script to deploy it, you need to manually create all the resources. ![image](https://cdn.edi.wang/web-assets/ediwang-azure-arch-visio-nov2022.png) @@ -22,17 +22,6 @@ There is no automated script to deploy it, you need to manually create all the r Use automated deployment script to get your Moonglade up and running in 10 minutes with minimal Azure components, follow instructions [here](https://github.com/EdiWang/Moonglade/wiki/Quick-Deploy-on-Azure) -### Quick Deploy with Docker-Compose - -Simply go the the root folder of this repo and run: - -```bash -docker-compose build -docker-compose up -``` - -That's it! Now open: [Browser: http://localhost:8080](http://localhost:8080) - ## 🐵 Development Tools | Alternative @@ -42,12 +31,11 @@ Tools | Alternative ### Setup Database -You can choose from SQL Server, PostgreSQL or MySQL. Update your database connection string in `appsettings.json`, `ConnectionStrings` section. - +> Free version of SQL Server Express would be sufficient for production use. -Database | `DatabaseType` | `MoongladeDatabase` Example +Database | `DatabaseType` | `appsettings.json/ConnectionStrings/MoongladeDatabase` Example --- | --- | --- -Microsoft SQL Server | `SqlServer` | `Server=(localdb)\\MSSQLLocalDB;Database=moonglade;Trusted_Connection=True;` +Microsoft SQL Server | `SqlServer` | `Server=(local);Database=moonglade;Trusted_Connection=True;` MySQL | `MySql` | `Server=localhost;Port=3306;Database=moonglade;Uid=root;Pwd=***;` PostgreSQL | `PostgreSql` | `User ID=***;Password=***;Host=localhost;Port=5432;Database=moonglade;Pooling=true;` @@ -105,6 +93,8 @@ You need to hava an [**Minio Server**](https://docs.min.io/). You can also choose File System for image storage if you don't have a cloud option. +Windows Deployment Example: + ```json { "Provider": "filesystem", @@ -112,6 +102,15 @@ You can also choose File System for image storage if you don't have a cloud opti } ``` +Linux Deployment Example: + +```json +{ + "Provider": "filesystem", + "FileSystemPath": "/var/UploadedImages" +} +``` + ### Comment Moderator Setup [Moonglade.ContentSecurity](https://github.com/EdiWang/Moonglade.ContentSecurity) Azure Function to enable comment moderation. @@ -138,7 +137,7 @@ Setup [Moonglade.Email](https://github.com/EdiWang/Moonglade.Email) Azure Functi ### Others - [System Settings](https://github.com/EdiWang/Moonglade/wiki/System-Settings) -- [Security Headers](https://github.com/EdiWang/Moonglade/wiki/Security-Headers) +- [Security HTTP Headers](https://github.com/EdiWang/Moonglade/wiki/Security-Headers) ## 🎉 Blog Protocols or Standards diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index 6681855e8..000000000 --- a/docker-compose.yml +++ /dev/null @@ -1,27 +0,0 @@ -version: '3' -services: - db: - image: mariadb - restart: always - environment: - MYSQL_ROOT_PASSWORD: ROOT_SUPER_EVIL_PASSWORD@1234 - MYSQL_DATABASE: AppDatabase - MYSQL_USER: WebApp - MYSQL_PASSWORD: WebApp@Passw0rd - ports: - - "3306:3306" - web: - build: . - environment: - ConnectionStrings__MoongladeDatabase: "Server=db;Database=AppDatabase;Uid=WebApp;Pwd=WebApp@Passw0rd;" - ConnectionStrings__DatabaseType: "MySQL" - ImageStorage__FileSystemPath: "/app/images" - ports: - - "8080:8080" - depends_on: - - db - healthcheck: - test: ["CMD", "curl", "-f", "http://localhost:8080"] - interval: 30s - timeout: 10s - retries: 5 diff --git a/src/Directory.Build.props b/src/Directory.Build.props index bd50fdc7c..45e0967b5 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -3,8 +3,8 @@ Edi Wang edi.wang (C) 2024 edi.wang@outlook.com - 14.8.0.0 - 14.8.0.0 - 14.8.0 + 14.8.1.0 + 14.8.1.0 + 14.8.1 \ No newline at end of file diff --git a/src/Moonglade.Core/PostFeature/UpdatePostCommand.cs b/src/Moonglade.Core/PostFeature/UpdatePostCommand.cs index ddf9a6b51..1422ee220 100644 --- a/src/Moonglade.Core/PostFeature/UpdatePostCommand.cs +++ b/src/Moonglade.Core/PostFeature/UpdatePostCommand.cs @@ -76,7 +76,7 @@ public async Task Handle(UpdatePostCommand request, CancellationToke } // #325: Allow changing publish date for published posts - if (postEditModel.PublishDate is not null && post.PubDateUtc.HasValue) + if (postEditModel.ChangePublishDate && postEditModel.PublishDate is not null && post.PubDateUtc.HasValue) { var tod = post.PubDateUtc.Value.TimeOfDay; var adjustedDate = postEditModel.PublishDate.Value;