一、Teedy介绍
1.Teedy简介
Teedy是一个开源的、自定义程度非常高的文档管理工具,比较适合于项目组用于文档管理,协作存储相当方便。
创建和编辑文档:用户可以使用Markdown格式创建和编辑文档,还可以添加标签和注释。
文件上传和管理:用户可以上传和管理文档、图片和其他文件。
搜索和过滤:Teedy支持关键词搜索和标签过滤,使用户可以快速找到需要的文档。
分享和协作:用户可以将文档分享给其他人,还可以设置权限和共享链接。
界面自定义:Teedy提供了多种主题和布局,用户可以根据自己的喜好进行自定义。
安全性和隐私保护:Teedy支持SSL加密、用户认证和数据库加密等安全性和隐私保护功能
二、本次实践介绍
1. 本次实践简介
a.本次实践部署环境为个人笔记本ubuntu日常工作的测试环境,若是生产环境请谨慎部署;
b.本次实践为快速使用docker部署开源Teedy于个人ubuntu上。
c.项目地址https://github.com/sismics/docs/
2. 本地环境规划
本次实践环境规划:下载镜像sismics/docs:latest,通过docker-cli或者docker compose启动容器
镜像命名 | IP地址 | 容器镜像版本 | 操作系统版本 |
Teedy | localhost | latest | ubuntu 22.04 |
三、检查本地Docker环境
1. 检查本地Docker版本
检查Docker版本:docker version
root@WellDone:/home/goodjob# docker version
Client: Docker Engine - Community
Version: 25.0.0
API version: 1.44
Go version: go1.21.6
Git commit: e758fe5
Built: Thu Jan 18 17:09:49 2024
OS/Arch: linux/amd64
Context: default
Server: Docker Engine - Community
Engine:
Version: 25.0.0
API version: 1.44 (minimum version 1.24)
Go version: go1.21.6
Git commit: 615dfdf
Built: Thu Jan 18 17:09:49 2024
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.27
GitCommit: a1496014c916f9e62104b33d1bb5bd03b0858e59
runc:
Version: 1.1.11
GitCommit: v1.1.11-0-g4bccb38
docker-init:
Version: 0.19.0
GitCommit: de40ad0
root@WellDone:/home/goodjob#
2. 检查Docker服务状态
检查Docker服务状态,确保Docker服务正常运行。
systemctl status docker
root@WellDone:/home/goodjob/Downloads# systemctl status docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2024-01-24 08:54:31 CST; 1 day 4h ago
TriggeredBy: ● docker.socket
Docs: https://docs.docker.com
Main PID: 1549 (dockerd)
Tasks: 65
Memory: 419.5M
CPU: 38.874s
CGroup: /system.slice/docker.service
├─ 1549 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
├─ 2010 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 6379 -container-ip 172.17.0.2 -container-port 6379
├─ 2016 /usr/bin/docker-proxy -proto tcp -host-ip :: -host-port 6379 -container-ip 172.17.0.2 -container-port 6379
├─ 2029 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 5432 -container-ip 172.17.0.3 -container-port 5432
├─ 2036 /usr/bin/docker-proxy -proto tcp -host-ip :: -host-port 5432 -container-ip 172.17.0.3 -container-port 5432
├─123083 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 8888 -container-ip 172.17.0.4 -container-port 8080
└─123095 /usr/bin/docker-proxy -proto tcp -host-ip :: -host-port 8888 -container-ip 172.17.0.4 -container-port 8080
1月 24 08:54:31 WellDone dockerd[1549]: time="2024-01-24T08:54:31.067895045+08:00" level=info msg="API listen on /run/docker.sock"
1月 24 08:54:31 WellDone systemd[1]: Started Docker Application Container Engine.
1月 24 16:13:48 WellDone dockerd[1549]: time="2024-01-24T16:13:48.185008219+08:00" level=info msg="ignoring event" container=8ad99af82d8a41dd661d>
1月 24 16:13:48 WellDone dockerd[1549]: time="2024-01-24T16:13:48.189484205+08:00" level=warning msg="ShouldRestart failed, container will not be>
1月 24 21:58:08 WellDone dockerd[1549]: time="2024-01-24T21:58:08.024915139+08:00" level=info msg="ignoring event" container=27fd28e2993f31b170b8>
1月 24 21:58:08 WellDone dockerd[1549]: time="2024-01-24T21:58:08.029986730+08:00" level=warning msg="ShouldRestart failed, container will not be>
1月 25 10:46:16 WellDone dockerd[1549]: time="2024-01-25T10:46:16.329180722+08:00" level=info msg="Container failed to exit within 10s of signal >
1月 25 10:46:16 WellDone dockerd[1549]: time="2024-01-25T10:46:16.350757439+08:00" level=info msg="ignoring event" container=b1223add00f36bbb3246>
1月 25 10:49:21 WellDone dockerd[1549]: time="2024-01-25T10:49:21.993755983+08:00" level=info msg="Container failed to exit within 10s of signal >
1月 25 10:49:22 WellDone dockerd[1549]: time="2024-01-25T10:49:22.015822650+08:00" level=info msg="ignoring event" container=edb0e153b45dbe62acd8>
lines 1-28/28 (END)
四、下载Teedy镜像
1.下载Teedy镜像
root@HEJIAJIN-FX506HE:/home/welldone# docker pull sismics/docs
Using default tag: latest
latest: Pulling from sismics/docs
c5cc0d8681c1: Pull complete
25992ae88689: Pull complete
92b293e28b63: Pull complete
5e97fb8c1b1b: Pull complete
e89d6de98e44: Pull complete
9181ab0a3cc7: Pull complete
986d85dbde77: Pull complete
ff6f9607eef5: Pull complete
e1f18d97e35f: Pull complete
5827635e4d0f: Pull complete
3a2abf46fbbe: Pull complete
e2d1dd553bca: Pull complete
d64ca9609368: Pull complete
57b31095515c: Pull complete
afd0e1b54580: Pull complete
d4dc52236c92: Pull complete
df51b630111c: Pull complete
b7f71ce56e9d: Pull complete
aabd4c468f60: Pull complete
9a77c3212377: Pull complete
Digest: sha256:e86804e995a0be52ee81231bfcbeb8b7003a15fd5dc24b300e23f498850d9aa2
Status: Downloaded newer image for sismics/docs:latest
docker.io/sismics/docs:latest
2.使用docker-compose启动一个Teedy的容器
version: '3.9'
services:
docs:
image: sismics/docs
container_name: Teedy
volumes:
- '/container/teedy/data:/data'
environment:
- DOCS_ADMIN_PASSWORD_INIT="$$2a$$05$$PcMNUbJvsk7QHFSfEIDaIOjk1VI9/E7IPjTKx.jkjPxkx2EOKSoPS"
- DOCS_ADMIN_EMAIL_INIT=admin@example.com
- 'DOCS_BASE_URL=http://localhost:4498'
ports:
- '4498:8080'
restart: always
3.使用docker-cli启动一个Teedy的容器
docker run -d \
--restart always \
-p 4498:8080 \
-e DOCS_BASE_URL=http://localhost:4498 \
-e DOCS_ADMIN_EMAIL_INIT=admin@example.com \
-e DOCS_ADMIN_PASSWORD_INIT="$$2a$$05$$PcMNUbJvsk7QHFSfEIDaIOjk1VI9/E7IPjTKx.jkjPxkx2EOKSoPS" \
-v /data/teedy/data:/data \
--name Teedy \
sismics/docs:latest
4.查看Teedy容器状态
root@HEJIAJIN-FX506HE:/container/docker-compose/docker-firsttest# docker compose ps
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
Teedy sismics/docs "bin/jetty.sh run" docs 4 seconds ago Up 3 seconds 0.0.0.0:4498->8080/tcp, :::4498->8080/tcp
六、访问reference首页
访问地址http://localhost:4498 账号admin,密码superSecure
ps:内网穿透搭建好了,minipc可以撑一段时间,这些测试的服务应该会保留一段时间...如果有需要体验的但是服务已经被我down了的,可以在微信公众号《零氪的云原生》私我开启!