当前位置: 首页 > news >正文

第2篇【Docker项目实战】使用Docker部署Raneto知识库平台(转载)

【Docker项目实战】使用Docker部署Raneto知识库平台

一、Raneto介绍

1.1 Raneto简介

Raneto是一个免费、开放、简单的 Markdown 支持的 Node.js 知识库。

1.2 知识库介绍

  • 知识库

知识库是指存储和组织知识的系统或库,它包括了各种类型的信息和知识,如文本、图像、音频、视频等。知识库可以用于存储和检索知识,帮助人们获取特定领域的知识和解决问题。知识库通常由专业人员创建和维护,他们通过收集和整理各种资源和信息来构建一个完整的知识库。知识库可以包含大量的知识和信息,涵盖多个领域和主题。知识库可以用于多种用途,例如教育、研究、咨询等。它可以为学生提供学习资料和参考文献,为研究人员提供相关领域的最新研究成果,为咨询师提供解决问题的指导。知识库的优势在于它能够集中存储和组织大量的知识和信息,使其易于访问和使用。此外,知识库还可以通过搜索和过滤功能来帮助用户快速找到所需的知识和信息。

  • 知识库工具

知识库工具是一种用于收集、组织、存储和检索知识的软件工具。它们提供了一个集中的平台,可以方便地创建、记录和共享知识,以便团队成员或用户可以随时访问和使用。

二、本地环境介绍

2.1 本地环境规划

本次实践为个人测试环境,操作系统版本为centos7.6。

hostnameIP地址操作系统版本Docker版本
dokcer192.168.3.166centos 7.62 20.10.17

2.2 本次实践介绍

1.本次实践部署环境为个人测试环境,生产环境请谨慎; 2.本次实践需要提前在自己服务器上配置好Docker环境,确保Docker环境正常; 3.在Docker环境下部署Raneto知识库平台。

三、本地环境检查

3.1 检查Docker服务状态

检查Docker服务是否正常运行,确保Docker正常运行。

[root@jeven ~]# systemctl status docker
● docker.service - Docker Application Container EngineLoaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)Active: active (running) since Fri 2023-12-01 22:00:49 CST; 3 days agoDocs: https://docs.docker.comMain PID: 11506 (dockerd)Tasks: 10Memory: 935.8MCGroup: /system.slice/docker.service└─11506 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock

3.2 检查Docker版本

检查Docker版本

[root@jeven ~]# docker -v
Docker version 20.10.17, build 100c701

3.3 检查docker compose 版本

检查Docker compose版本,确保2.0以上版本。

[root@jeven ~]# docker compose version
Docker Compose version v2.6.01.2.

四、下载Raneto镜像

从docker hub拉取Raneto镜像,版本为latest镜像。如果镜像拉取缓慢,则可以配置国内云厂商的容器镜像加速,提高下载速度。

[root@jeven ~]#  docker pull  raneto/raneto:latest
latest: Pulling from raneto/raneto
7264a8db6415: Pull complete
d68f2f1a5d31: Pull complete
e7e6b7606c1a: Pull complete
904e9a84b7a0: Pull complete
88e752eeee15: Pull complete
14e927c1dd9e: Pull complete
a3e1caebe52b: Pull complete
Digest: sha256:ed0d2d846ed6239791d67bbe0420c6fa2c7a8d2e2d5d30d17fb726e77c9dd576
Status: Downloaded newer image for raneto/raneto:latest
docker.io/raneto/raneto:latest

五、部署Raneto知识库平台

5.1 创建挂载目录

创建挂载目录/data/raneto/

mkdir -p /data/raneto/{config,content} && cd /data/raneto

设置目录权限

chmod -R 777 /data/raneto

5.2 编辑config.js文件

Raneto的配置文件为config.js,在我们新建 /data/raneto/config目录下,编辑config.js文件。

// Modules
var path = require('path');// Which Theme to Use?
//
// Local Directory Example (for development or custom themes)
// var theme_dir = path.join(__dirname, 'themes');
// var theme_name = 'my-theme-directory';
//
// Themes from NPM
// use "dist" as the theme name for modules (for now)
var theme_dir = path.join(__dirname,'..','node_modules','@raneto/theme-default'
);
var theme_name = 'dist';var config = {// Your site title (format: page_title - site_title)site_title: 'Raneto Docs',// The base URL of your site (can use %base_url% in Markdown files)// This should be the full path to your Raneto installation://   example 1: https://raneto.mydomain.com//   example 2: https://www.mydomain.com/raneto// Do not include a trailing "/"// Leave this as an empty string to use the defaultbase_url: '',nowrap: true,// Path Prefix// If you are running Raneto on a subpath of your domain, add it here// Leave it blank if you are not sure//// Example: if you are running Raneto at http://www.mydomain.com/raneto//          then you would enter '/raneto' belowpath_prefix: '',// Used for the "Get in touch" page footer linksupport_email: '',// Footer Text / Copyrightcopyright: `Copyright © ${new Date().getFullYear()} - <a href="https://raneto.com">Powered by Raneto</a>`,// Excerpt length (used in search)excerpt_length: 400,// The meta value by which to sort pages (value should be an integer)// If this option is blank pages will be sorted alphabeticallypage_sort_meta: 'sort',// Should categories be sorted numerically (true) or alphabetically (false)// If true category folders need to contain a "sort" file with an integer valuecategory_sort: true,// Controls behavior of home page if meta ShowOnHome is not present. If set to true// all categories or files that do not specify ShowOnHome meta property will be shownshow_on_home_default: true,// Theme (see top of file)theme_dir,theme_name,// Specify the path of your content folder where all your '.md' files are located// Fix: Cannot be an absolute pathcontent_dir: path.join(__dirname, '..', 'content', 'pages'),// Where is the public directory or document root?public_dir: path.join(theme_dir, theme_name, 'public'),// The base URL of your images folder,// Relative to config.public_dir// (can use %image_url% in Markdown files)image_url: '/images',// Add your analytics tracking code (including script tags)analytics: '',// Set to true to enable the web editorallow_editing: true,// Set to true to enable HTTP Basic Authenticationauthentication: true,// If editing is enabled, set this to true to only authenticate for editing, not for viewingauthentication_for_edit: true,// If authentication is enabled, set this to true to enable authentication for reading tooauthentication_for_read: false,// Google OAuthgoogleoauth: false,google_group_restriction: {enabled: false,api_key: 'GOOGLE_API_KEY',group_name: 'GOOGLE_GROUP_NAME',},oauth2: {client_id: 'GOOGLE_CLIENT_ID',client_secret: 'GOOGLE_CLIENT_SECRET',callback: 'http://localhost:3000/auth/google/callback',hostedDomain: 'google.com',},secret: 'someCoolSecretRightHere',// ##### WARNING #####// You MUST change the username and password for security// Do NOT use "admin" as a username as it's easily guessed.// You are encouraged to use tools to generate a password// Preferably, use a local password manager// If you absolutely must use an online tool, here are some suggestions// https://bitwarden.com/password-generator/// https://www.grc.com/passwords.htmcredentials: [{username: 'admin',password: 'password',},{username: 'admin2',password: 'password',},],locale: 'zh',// Support search with extra languagessearchExtraLanguages: ['zh'],// Sets the format for datetime'sdatetime_format: 'Do MMM YYYY',// Set to true to render suitable layout for RTL languagesrtl_layout: false,// Edit Home Page title, description, etc.home_meta: {// title       : 'Custom Home Title',// description : 'Custom Home Description'},// variables: [//   {//     name: 'test_variable',//     content: 'test variable'//   },//   {//     name: 'test_variable_2',//     content: 'test variable 2'//   }// ]// Set to true to enable generation of table of contentstable_of_contents: false,// Configure generation of table of contents (see markdown-toc's docs for details on available options)table_of_contents_options: {// append: 'Table of contents appendix',// maxdepth: 6,// firsth1: true,},menu_on_pages: true,menu_on_page_collapsible: true,
};// Exports
module.exports = config;

在config.js文件中,可以自行修改三个地方:

  • 站点名称
site_title: 'Raneto Docs',
  • 用户名和密码
credentials: [{username: 'admin',password: 'password',},{username: 'admin2',password: 'password',},],
  • 支持中文语言
locale: 'zh',// Support search with extra languagessearchExtraLanguages: ['zh'],

5.3 编辑docker-compose.yaml文件

新建raneto容器的docker-compose.yaml部署文件,内容如下:

version: "3.6"services:raneto:image: raneto/raneto:latestcontainer_name: ranetorestart: alwaysports:- 7860:3000volumes:- /data/raneto/config:/opt/raneto/config- /data/raneto/content:/opt/raneto/content

5.4 创建raneto容器

使用docker-compose.yaml文件创建raneto容器

[root@jeven raneto]# docker compose up -d
[+] Running 2/2⠿ Network raneto_default  Created                                                                                      0.1s⠿ Container raneto        Started                                                                                      0.5s

5.5 检查raneto容器状态

检查raneto容器状态,确保raneto容器正常启动。

[root@jeven raneto]# docker compose ps
NAME                COMMAND                  SERVICE             STATUS              PORTS
raneto              "docker-entrypoint.s…"   raneto              running             0.0.0.0:7860->3000/tcp, :::7860->3000/tcp1.2.3.

5.6 检查raneto容器日志

检查raneto容器日志,确保raneto服务正常运行。

[root@jeven raneto]# docker compose logs
raneto  |
raneto  | > raneto@0.17.6 start
raneto  | > DEBUG=raneto node server.js
raneto  |
raneto  | 2023-12-05T09:06:05.706Z raneto Express HTTP server listening on port 3000

【Docker项目实战】使用Docker部署Raneto知识库平台_Docker

六、Raneto的基本使用

6.1 访问Raneto首页

访问地址:** http://192.168.3.166:7860/,将IP换为自己服务器IP地址,进入到Raneto首页。

【Docker项目实战】使用Docker部署Raneto知识库平台_docker_02

6.2 登录Raneto

使用默认的密码admin/password,登录Raneto。

【Docker项目实战】使用Docker部署Raneto知识库平台_docker_03

【Docker项目实战】使用Docker部署Raneto知识库平台_Markdown_04

6.3 上传文档

将md格式文件上传到宿主机的/data/raneto/content/pages目录下,刷新页面即可。

[root@jeven pages]# pwd
/data/raneto/content/pages
[root@jeven pages]# ls
Linux系统之ls命令的基本使用.md

【Docker项目实战】使用Docker部署Raneto知识库平台_docker_05

【Docker项目实战】使用Docker部署Raneto知识库平台_docker_06

6.4 新建页面目录

在宿主机的/data/raneto/content/pages目录下,新建Linux技术目录。

[root@jeven pages]# mkdir Linux技术
[root@jeven pages]# ls
Linux技术  Linux系统之ls命令的基本使用.md

重新刷新页面后,可以看到Linux技术目录。

【Docker项目实战】使用Docker部署Raneto知识库平台_Docker_07

七、总结

Raneto是一款简单高效的开源知识库工具,帮助我们整理知识文档和构建知识体系。它具有简洁直观的界面,可以轻松对文档进行分组管理。而且,它还提供了友好的Markdown支持,让我们能够以更加方便的编写和浏览技术文档。如果你正在寻找一个简单易用的知识库工具,那么Raneto是值得一试的选择。

相关文章:

第2篇【Docker项目实战】使用Docker部署Raneto知识库平台(转载)

【Docker项目实战】使用Docker部署Raneto知识库平台 一、Raneto介绍 1.1 Raneto简介 Raneto是一个免费、开放、简单的 Markdown 支持的 Node.js 知识库。 1.2 知识库介绍 知识库 知识库是指存储和组织知识的系统或库&#xff0c;它包括了各种类型的信息和知识&#xff0c;如…...

【Javascript】 Promise 对象(二)

【Javascript】 Promise 对象&#xff08;一&#xff09;-CSDN博客 Promise.all() Promise.all()方法用于将多个 Promise 实例&#xff0c;包装成一个新的 Promise 实例。 const p Promise.all([p1, p2, p3]);上面代码中&#xff0c;Promise.all()方法接受一个数组作为参数&…...

细说C++反向迭代器:原理与用法

文章目录 一、引言二、反向迭代器的原理与实现细节三、模拟实现C反向迭代器反向迭代器模板类的设计反向迭代器的使用示例与测试 一、引言 迭代器与反向迭代器的概念引入 迭代器&#xff08;Iterator&#xff09;是C标准模板库&#xff08;STL&#xff09;中的一个核心概念&am…...

SpringBoot(依赖管理和自动配置)

文章目录 1.基本介绍1.springboot是什么&#xff1f;2.快速入门1.需求分析2.环境配置1.确认开发环境2.创建一个maven项目3.依赖配置 pom.xml4.文件目录5.MainApp.java &#xff08;启动类&#xff0c;常规配置&#xff09;6.HelloController.java &#xff08;测试Controller&a…...

cad怎么转换成黑白的pdf图纸?分享3个常用的软件!

在工程设计、建筑、机械制造等领域&#xff0c;CAD图纸的应用非常广泛。然而&#xff0c;有时出于某些需要&#xff0c;我们可能需要将CAD图纸转换为黑白的PDF格式。那么&#xff0c;如何实现这一转换呢&#xff1f;本文将为您详细介绍几种常用的转换软件及其操作步骤。 迅捷CA…...

maven本地仓库依赖上传到远程仓库

本地仓库上传到远程仓库 批量上传&#xff1a; 批量本地仓库依赖&#xff08;jar包&#xff09;上传脚本&#xff1a; #!/bin/bash # copy and run this script to the root of the repository directory containing files # this script attempts to exclude uploading itse…...

ISIS多区域实验简述

为支持大型路由网络&#xff0c;IS-IS在路由域内采用两级分层结构。 IS-IS网络中三种级别的路由设备&#xff1a;将Level-1路由设备部署在区域内&#xff0c;Level-2路由设备部署在区域间&#xff0c;Level-1-2路由设备部署在Level-1和Level-2路由设备的中间。 实验拓扑图&…...

go语言基础笔记

1.基本类型 1.1. 基本类型 bool int: int8, int16, int32(rune), int64 uint: uint8(byte), uint16, uint32, uint64 float32, float64 string 复数&#xff1a;complex64, complex128 复数有实部和虚部&#xff0c;complex64的实部和虚部为32位&#xff0c;complex128的实部…...

kettle 9.4和Pentoho 9.4下载及安装方法简介

kettle 9.4和Pentoho 9.4下载及安装方法简介 下载地址&#xff1a; https://sourceforge.net/projects/pentaho/files/ 下载步骤&#xff1a; #------------- 一、点击选项卡&#xff1a;summary/ 二、点击第一行链接 https://www.hitachivantara.com/en-us/products/pentaho…...

社交革命的引领者:探索Facebook如何改变我们的生活方式

1.数字社交的兴起 随着互联网的普及&#xff0c;社交媒体成为我们日常生活的重要组成部分。Facebook作为其中的先驱&#xff0c;从最初的社交网络演变成了一个拥有数十亿用户的全球化平台。它不仅改变了我们与世界互动的方式&#xff0c;还深刻影响了我们的社交习惯、人际关系以…...

常用的推荐算法

推荐系统在帮助用户发现可能感兴趣的产品、服务或信息方面发挥着重要作用。下面是一些常用的推荐算法&#xff1a; 1. 协同过滤 用户基于协同过滤&#xff08;User-Based Collaborative Filtering&#xff09; 基于用户之间的相似性为用户推荐物品。算法会找出与目标用户兴趣…...

使用Python进行图片格式转化/分辨率转化

一.下载python PIY插件库 PIP下载命令: pip install pillow -i https://mirrors.aliyun.com/pypi/simple PIY插件库:pillow Installation - Pillow (PIL Fork) 10.3.0.dev0 documentation 二.分辨率转化 from PIL import Image import osresolution (1024, 1024) with Image…...

植物神经功能紊乱患者每天从5片黛力新减少至2片,只因找对了治疗方法!

植物神经功能紊乱是一种常见的心理疾病&#xff0c;其症状包括焦虑、失眠、疲劳、头痛、胃肠不适等&#xff0c;给患者带来很大的困扰。然而&#xff0c;这种疾病是可以治疗的。本文将介绍一位植物神经功能紊乱患者的治疗经历&#xff0c;希望能够帮助更多的人了解和治疗此病。…...

SpringSecurity 快速入门

文章目录 1. 认证授权概述1.1 认证授权概念1.1.1 认证1.1.2 授权 1.2 权限数据模型1.3 RBAC权限模型1.3.1 介绍1.3.2 基于角色访问控制1.3.3 基于资源访问控制 1.4 常见认证方式1.4.1 Cookie-Session1.4.2 jwt令牌无状态认证 1.5 技术实现 2. SpringSecurity入门2.1 介绍2.2 入…...

MySQL--执行一条 select 语句,期间发生了什么?

执行一条 SQL 查询语句&#xff0c;期间发生了什么&#xff1f; 连接器&#xff1a;建立连接&#xff0c;管理连接、校验用户身份&#xff1b;查询缓存&#xff1a;查询语句如果命中查询缓存则直接返回&#xff0c;否则继续往下执行。MySQL 8.0 已删除该模块&#xff1b;解析 …...

DeepL:word文档导出后不能编辑

参考解决用DeepL翻译文档后不能编辑问题_deepl翻译出来的文档怎么编辑-CSDN博客 1、将deepL导出的word文档另存为.xml文件 2、将.xml文件以txt格式打开&#xff0c;查找内容&#xff1a;<w:documentProtection&#xff0c;删除整个标签&#xff08;包括<w: ...>&…...

PCL 约束Delaunay三角网(版本二)

目录 一、算法概述二、代码实现三、结果展示四、测试数据本文由CSDN点云侠原创,原文链接。如果你不是在点云侠的博客中看到该文章,那么此处便是不要脸的爬虫与GPT。 一、算法概述 PCL 点云Delaunay三角剖分一文给出了PCL中Delaunay三角网算法的基础用法。本文在基础用法的基…...

位运算#蓝桥杯

位运算#蓝桥杯 文章目录 位运算#蓝桥杯1、小蓝学位运算2、异或森林3、位移4、笨笨的机器人5、博弈论 1、小蓝学位运算 #include<bits/stdc.h> using namespace std; using LL long long; const LL N 1e97; template<int kcz> struct ModInt { #define T (*this)…...

Python yield from

yield from是Python生成器&#xff08;generator&#xff09;中的一个语法&#xff0c;用于简化生成器的操作。它可以使一个生成器委托部分操作给另一个生成器&#xff0c;从而简化代码。yield from在Python 3.3及更高版本中被引入。 在使用yield from之前&#xff0c;我们需要…...

Atcoder TUPC 2023(東北大学プログラミングコンテスト 2023)E. And DNA(矩阵快速幂+拆位讨论)

题目 长为n(3<n<1e9)的数组&#xff0c;第i个数ai在[0,m](m<1e9)之间 对于i∈[1,n]&#xff0c;均满足a[i](a[i-1]&a[i1])m&#xff0c;求这样可能的数组的方案数 特别地&#xff0c;认为a[0]a[n],a[n1]a[1]&#xff0c;即这个数组是个环形的数组 思路来源 官…...

Leetcode 3576. Transform Array to All Equal Elements

Leetcode 3576. Transform Array to All Equal Elements 1. 解题思路2. 代码实现 题目链接&#xff1a;3576. Transform Array to All Equal Elements 1. 解题思路 这一题思路上就是分别考察一下是否能将其转化为全1或者全-1数组即可。 至于每一种情况是否可以达到&#xf…...

c++ 面试题(1)-----深度优先搜索(DFS)实现

操作系统&#xff1a;ubuntu22.04 IDE:Visual Studio Code 编程语言&#xff1a;C11 题目描述 地上有一个 m 行 n 列的方格&#xff0c;从坐标 [0,0] 起始。一个机器人可以从某一格移动到上下左右四个格子&#xff0c;但不能进入行坐标和列坐标的数位之和大于 k 的格子。 例…...

Robots.txt 文件

什么是robots.txt&#xff1f; robots.txt 是一个位于网站根目录下的文本文件&#xff08;如&#xff1a;https://example.com/robots.txt&#xff09;&#xff0c;它用于指导网络爬虫&#xff08;如搜索引擎的蜘蛛程序&#xff09;如何抓取该网站的内容。这个文件遵循 Robots…...

【Oracle】分区表

个人主页&#xff1a;Guiat 归属专栏&#xff1a;Oracle 文章目录 1. 分区表基础概述1.1 分区表的概念与优势1.2 分区类型概览1.3 分区表的工作原理 2. 范围分区 (RANGE Partitioning)2.1 基础范围分区2.1.1 按日期范围分区2.1.2 按数值范围分区 2.2 间隔分区 (INTERVAL Partit…...

AGain DB和倍数增益的关系

我在设置一款索尼CMOS芯片时&#xff0c;Again增益0db变化为6DB&#xff0c;画面的变化只有2倍DN的增益&#xff0c;比如10变为20。 这与dB和线性增益的关系以及传感器处理流程有关。以下是具体原因分析&#xff1a; 1. dB与线性增益的换算关系 6dB对应的理论线性增益应为&…...

GO协程(Goroutine)问题总结

在使用Go语言来编写代码时&#xff0c;遇到的一些问题总结一下 [参考文档]&#xff1a;https://www.topgoer.com/%E5%B9%B6%E5%8F%91%E7%BC%96%E7%A8%8B/goroutine.html 1. main()函数默认的Goroutine 场景再现&#xff1a; 今天在看到这个教程的时候&#xff0c;在自己的电…...

掌握 HTTP 请求:理解 cURL GET 语法

cURL 是一个强大的命令行工具&#xff0c;用于发送 HTTP 请求和与 Web 服务器交互。在 Web 开发和测试中&#xff0c;cURL 经常用于发送 GET 请求来获取服务器资源。本文将详细介绍 cURL GET 请求的语法和使用方法。 一、cURL 基本概念 cURL 是 "Client URL" 的缩写…...

2025年- H71-Lc179--39.组合总和(回溯,组合)--Java版

1.题目描述 2.思路 当前的元素可以重复使用。 &#xff08;1&#xff09;确定回溯算法函数的参数和返回值&#xff08;一般是void类型&#xff09; &#xff08;2&#xff09;因为是用递归实现的&#xff0c;所以我们要确定终止条件 &#xff08;3&#xff09;单层搜索逻辑 二…...

从零手写Java版本的LSM Tree (一):LSM Tree 概述

&#x1f525; 推荐一个高质量的Java LSM Tree开源项目&#xff01; https://github.com/brianxiadong/java-lsm-tree java-lsm-tree 是一个从零实现的Log-Structured Merge Tree&#xff0c;专为高并发写入场景设计。 核心亮点&#xff1a; ⚡ 极致性能&#xff1a;写入速度超…...

智警杯备赛--excel模块

数据透视与图表制作 创建步骤 创建 1.在Excel的插入或者数据标签页下找到数据透视表的按钮 2.将数据放进“请选择单元格区域“中&#xff0c;点击确定 这是最终结果&#xff0c;但是由于环境启不了&#xff0c;这里用的是自己的excel&#xff0c;真实的环境中的excel根据实训…...