匿名用户

这个人很神秘,什么信息也没有

关闭
半山灯
2024-07-02
点 赞
0
热 度
0
评 论
0

8️⃣halo 部署简易记录

文章摘要

Deepseek

halo 部署简易记录

master,这是我的小站 https://blog.study996.cn ,欢迎访问哦~~

安装 docker

curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh

启动 docker

sudo systemctl start docker

设置开机启动

sudo systemctl enable docker

安装 docker-compose

sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

设置权限

sudo chmod +x /usr/local/bin/docker-compose

测试

docker-compose --version

安装 halo

本文是docker-compose方式安装,使用halo+postgresql搭建使用,利用nginx反向代理,使用hao 主题若干插件,评论为artalk

docker-compose.yml

version: "3"
services:
  halo:
    image: registry.fit2cloud.com/halo/halo:2.16
    restart: on-failure:3
    depends_on:
      halodb:
        condition: service_healthy
    networks:
      halo_network:
    volumes:
      - ./halo2:/root/.halo2
    ports:
      - "8090:8090"
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:8090/actuator/health/readiness"]
      interval: 30s
      timeout: 5s
      retries: 5
      start_period: 30s          
    command:
      - --spring.r2dbc.url=r2dbc:pool:postgresql://halodb/halo
      - --spring.r2dbc.username=halo
      # PostgreSQL 的密码,请保证与下方 POSTGRES_PASSWORD 的变量值一致。
      - --spring.r2dbc.password=openpostgresql
      - --spring.sql.init.platform=postgresql
      # 外部访问地址,请根据实际需要修改
      - --halo.external-url=http://localhost:8090/
  halodb:
    image: postgres:15.4
    restart: on-failure:3
    networks:
      halo_network:
    volumes:
      - ./db:/var/lib/postgresql/data
    healthcheck:
      test: [ "CMD", "pg_isready" ]
      interval: 10s
      timeout: 5s
      retries: 5
    environment:
      - POSTGRES_PASSWORD=openpostgresql
      - POSTGRES_USER=halo
      - POSTGRES_DB=halo
      - PGUSER=halo
networks:
  halo_network:

nginx

  1. 安装 要在 CentOS 7 上安装 Nginx,您可以按照以下步骤进行操作:
  2. 更新系统:sudo yum update
  3. 安装 EPEL 存储库(Extra Packages for Enterprise Linux):sudo yum install epel-release
  4. 安装 Nginx:sudo yum install nginx
  5. 启动 Nginx 服务:sudo systemctl start nginx
  6. 设置 Nginx 开机自启:sudo systemctl enable nginx
  7. 默认页面的文件路径为/usr/share/nginx/html/index.html。自定义 Nginx 的配置,可以编辑/etc/nginx/nginx.conf文件
  8. 配置
upstream halo {
  server 127.0.0.1:8090;
}
server {
  listen 80;
  listen [::]:80;
  server_name www.yourdomain.com;
  client_max_body_size 1024m;
  ___location / {
    proxy_pass http://halo;
    proxy_set_header HOST $host;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  }
}

主题

Hao : https://www.halo.run/store/apps/app-MgZJX

插件

  1. Meilisearch : https://www.halo.run/store/apps/app-yJlEz
  2. 站点迁移 https://www.halo.run/store/apps/app-TlUBt
  3. 站点推送插件 https://www.halo.run/store/apps/app-KdbUz
  4. 朋友圈 https://www.halo.run/store/apps/app-yISsV
  5. 瞬间 https://www.halo.run/store/apps/app-SnwWD
  6. 链接管理 https://www.halo.run/store/apps/app-hfbQg
  7. Vditor 编辑器 https://www.halo.run/store/apps/app-uBcYw
  8. 应用市场 https://www.halo.run/store/apps/app-VYJbF
  9. RSS https://www.halo.run/store/apps/app-KhIVw
  10. 搜索组件 https://www.halo.run/store/apps/app-DlacW
  11. 图库管理 https://www.halo.run/store/apps/app-BmQJW
  12. Sitemap https://www.halo.run/store/apps/app-QDFMI

评论

artalk : https://artalk.js.org


用键盘敲击出的不只是字符,更是一段段生活的剪影、一个个心底的梦想。希望我的文字能像一束光,在您阅读的瞬间,照亮某个角落,带来一丝温暖与共鸣。

半山灯

infj 提倡者

站长

不具版权性
不具时效性

文章内容不具时效性。若文章内容有错误之处,请您批评指正。


目录

欢迎来到半山灯的站点,为您导航全站动态

111 文章数
17 分类数
0 评论数
144标签数
最近评论

访问统计