An open source blog system based on .NET and Alibaba Cloud.
Current personal website,
- Personal information management.
- Homepage project management.
- Theme management (background, light and dark themes, BGM).
- Blog management (classification, tagging, archiving, comments).
- Feedback alerts.
- Network status detection.
- Visual Studio 2022 / Visual Studio Code
- .NET 8.0 SDK
- Libman (VS Extension)
- Bundler & Minifier (VS Extension)
- Mysql
- Docker(WSL2 is recommended)
If you use Visual Studio (Not Visual Studio Code), you don't need to install Libman CLI and Entity Framework CLI.
Install Libman CLI:
dotnet tool install -g Microsoft.Web.LibraryManager.Cli
Install Entity Framework Core CLI
dotnet tool install -g dotnet-ef
Clone source code
git clone https://github.com/lixinyang123/CoreHome.git
Configuration
You can refer to this blog to configure.
- CoreHome
- CoreHome.HomePage
- appsettings.json
- wwwroot/SiteMap.txt
- wwwroot/favicon.ico
- CoreHome.Admin
- appsettings.json
- wwwroot/favicon.ico
- CoreHome.ReverseProxy
- appsettings.json
- CoreHome.HomePage
The content of appsettings.json in
CoreHome.HomePage
andCoreHome.Admin
is exactly the same, just copy and paste.
Both CoreHome.HomePage and CoreHome.Admin's application.json
files should be configured.
"CoreHome": "server=[host];user id=[user];password=[password];database=corehome"
-
Visual Studio
- Backend:Click Restore Nuget Packages in Solution Explorer.
- CoreHome.Infrastructure
- CoreHome.Data
- CoreHome.HomePage
- CoreHome.Admin
- CoreHome.ReverseProxy
- Frontend:Click Restore Client Libraries in Solution Explorer.
- CoreHome.HomePage/libman.json
- CoreHome.Admin/libman.json
- Backend:Click Restore Nuget Packages in Solution Explorer.
-
Visual Studio Code or CLI
- Backend:Execute
dotnet restore
in the following directory.- CoreHome.HomePage
- CoreHome.Admin
- Frontend:Execute
libman restore
in the following directory.- CoreHome.HomePage
- CoreHome.Admin
- Backend:Execute
- Visual Studio
Tools -> Nuget Package Manager -> Package Manager Console
Update-Database
- Visual Studio Code or CLI
Execute the following commands in the CoreHome.HomePage
and CoreHome.Admin
directory.
dotnet-ef database update -p ..\CoreHome.Data
- Visual Studio or Visual Studio Code
Click Startup
in Solution Explorer or Ctrl+F5
.
- CLI
Execute the following commands in the CoreHome.HomePage
and CoreHome.Admin
directory.
dotnet run
- Visual Studio
Click Build Dockerfile
in Solution Explorer.
- Visual Studio Code or CLI
Execute the following command in the project root directory.
docker build --file ./CoreHome.Admin/Dockerfile --tag lixinyang/corehome-admin:latest .
docker build --file ./CoreHome.HomePage/Dockerfile --tag lixinyang/corehome-homepage:latest .
docker build --file ./CoreHome.ReverseProxy/Dockerfile --tag lixinyang/corehome-reverseproxy:latest .
You can use DockerHome
to deploy CoreHome, or you can deploy it manually.
You can refer to this blog to use DockerHome.