Skip to content

iaspnetcore/MiniBlog.Core

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Blog engine for ASP.NET Core 6.x

A full-featured yet simple blog engine built on ASP.NET Core 6.x.

project information

local:ctyun disk D:\developer_mini_core

github:https://github.com/iaspnetcore/MiniBlog.Core.git

domain:miniblog.iaspnetcore.com on vultr

Blog https://www.iaspnetcore.com/blogpost-5ec055705d065d499b65df13-how-to-create-a-miniblogcore-project-with-net6x-step-by-step

Create a ViewComponents https://docs.microsoft.com/en-us/aspnet/core/mvc/views/view-components?view=aspnetcore-6.0

Theme templates come from:https://getbootstrap.com/docs/5.1/examples/blog/#

Live demo: https://miniblog.iaspnetcore.com/
Username: demo
Password: demo

Custom themes

1.buy domain

2.buy server

  1. A to server

  2. install nginx

  3. config nginx for your domain

6.install Let’s Encrypt client certbot

7.downloaded SSL certificates for your domain

没有账号的点我注册Vultr账号(注册就送20美元哦)https://www.vultr.com/?ref=7035322-3B

Vultr注册购买图文教程 Click here.

Features

Technical features

How to use

On the command line

cd /
cd /var/www/MiniBlog.Core/src/Miniblog.Core

dotnet run --urls http://0.0.0.0:6002

dotnet run --urls http://localhost:6002

miniblog.iaspnetcore.com服务器配置

 miniblog.iaspnetcore.com服务器配置

1.miniblog.iaspnetcore.com

命令行启动

Debug

sudo systemctl stop kestrel-miniblogiaspnetcorecom.service

cd /
cd /var/www/MiniBlog.Core/src/Miniblog.Core

dotnet run --urls http://0.0.0.0:6002

dotnet run --urls http://localhost:6002


Release

sudo systemctl stop kestrel-miniblogiaspnetcorecom.service


cd /var/www/MiniBlog.Core/src/Miniblog.Core

dotnet publish -c release


cd /var/www/MiniBlog.Core/src/Miniblog.Core/bin/Release/net6.0/publish/

dotnet Miniblog.Core.dll  --urls http://127.0.0.1:6002


2.服务配置

sudo vi /etc/systemd/system/kestrel-miniblogiaspnetcorecom.service

path:/etc/systemd/system/kestrel-miniblogiaspnetcorecom.service

kestrel-miniblogiaspnetcorecom.service

[Unit]
Description=miniblog.iaspnetcore.com App running on Ubuntu

[Service]
WorkingDirectory=/var/www/MiniBlog.Core/src/Miniblog.Core/bin/Release/net6.0/publish
ExecStart=/usr/bin/dotnet /var/www/MiniBlog.Core/src/Miniblog.Core/bin/Release/net6.0/publish/Miniblog.Core.dll --urls http://127.0.0.1:6002
Restart=always
# Restart service after 10 seconds if the dotnet service crashes:
RestartSec=10
KillSignal=SIGINT
SyslogIdentifier=miniblog.iaspnetcore.com
User=www-data
Environment=ASPNETCORE_ENVIRONMENT=Production
Environment=DOTNET_PRINT_TELEMETRY_MESSAGE=false

[Install]
WantedBy=multi-user.target

3.Install first kestrel-miniblogiaspnetcorecom.service

sudo systemctl daemon-reload 
sudo systemctl enable kestrel-miniblogiaspnetcorecom.service
sudo systemctl start kestrel-miniblogiaspnetcorecom.service
sudo systemctl status kestrel-miniblogiaspnetcorecom.service


sudo systemctl restart kestrel-miniblogiaspnetcorecom.service
sudo systemctl stop kestrel-miniblogiaspnetcorecom.service
sudo systemctl status kestrel-miniblogiaspnetcorecom.service

sudo journalctl -fu kestrel-miniblogiaspnetcorecom.service



sudo systemctl restart kestrel-miniblogiaspnetcorecom.service


4.批处理

cp  -r /var/www/nopcommerce/wwwiaspnetcorecom/src/Presentation/Nop.Web/bin/release/net5.0/publish/wwwroot/uploadimages  /var/www/nopcommerce/wwwiaspnetcorecom/src/Presentation/Nop.Web/wwwroot/uploadimages

sudo systemctl stop kestrel-wwwiaspnetcorecom.service

cd /
cd var/www/nopcommerce/wwwiaspnetcorecom/src/Presentation/Nop.Web
dotnet publish -c release

sudo systemctl daemon-reload 
sudo systemctl restart kestrel-wwwiaspnetcorecom.service