目录
简介
Lenpaste 是 Pastebin 的替代品,具有语法高亮和可选的过期注释。自行托管您自己的实例!
有时,您需要一种快速的方式将代码片段和书面指南或教程即时发送给人们。使用 Lenpaste 是一种很好的方法,它允许您添加语法和过期时间。
Lenpaste是一种网络服务,可让您匿名共享笔记,是 pastebin.com 的替代品。不使用 Java 脚本。有自己的API。
官方:https://git.lcomrade.su/root/lenpaste
特色
- 无需注册
- 仅使用 cookie 来存储设置
- 可以在没有 JavaScript 的情况下工作
- 有自己的API
- 开源和自托管
安装
提前安装好DOCKER,如果未安装,请参考此文章:https://www.886699.xyz/2920.html
mkdir lenpaste
cd lenpaste
vim docker-compose.yml
复制下面内容。粘贴后保存:
version: "2"
services:
lenpaste:
# There are images for x86, x64, ARM64, ARM v7, ARM v6.
# The Raspberry Pi is supported, including the latest 64-bit versions.
image: git.lcomrade.su/root/lenpaste:latest
restart: always
environment:
# All parameters are optional
- LENPASTE_ADDRESS=:80 # ADDRES:PORT for HTTP server.
- LENPASTE_DB_DRIVER=sqlite3 # Currently supported drivers: 'sqlite3' and 'postgres'.
- LENPASTE_DB_SOURCE=/data/lenpaste.db # DB source.
- LENPASTE_DB_CLEANUP_PERIOD=3h # Interval at which the DB is cleared of expired but not yet deleted pastes.
- LENPASTE_ROBOTS_DISALLOW=false # Prohibits search engine crawlers from indexing site using robots.txt file.
- LENPASTE_TITLE_MAX_LENGTH=100 # Maximum length of the paste title. If 0 disable title, if -1 disable length limit.
- LENPASTE_BODY_MAX_LENGTH=20000 # Maximum length of the paste body. If -1 disable length limit. Can't be -1.
- LENPASTE_MAX_PASTE_LIFETIME=unlimited # Maximum lifetime of the paste. Examples: 10m, 1h 30m, 12h, 7w, 30d, 365d.
- LENPASTE_NEW_PASTES_PER_5MIN=15 # Maximum number of paste that can be created in 5 minutes from one IP. If 0 disable rate-limit.
- LENPASTE_ADMIN_NAME= # Name of the administrator of this server.
- LENPASTE_ADMIN_MAIL= # Email of the administrator of this server.
- LENPASTE_UI_DEFAULT_LIFETIME= # Lifetime of paste will be set by default in WEB interface. Examples: 10min, 1h, 1d, 2w, 6mon, 1y.
volumes:
# /data/lenpaste.db - SQLite DB if used.
# /data/about - About this server (TXT file).
# /data/rules - This server rules (TXT file).
# /data/terms - This server "terms of use" (TXT file).
# /data/lenpasswd - If this file exists, the server will ask for auth to create new pastes.
# File format: USER:PLAIN_PASSWORD on each line.
- "${PWD}/data:/data"
- "/etc/timezone:/etc/timezone:ro"
- "/etc/localtime:/etc/localtime:ro"
ports:
- "80:80"
然后执行:
docker-compose pull && docker-compose up -d
提示:如果要安装更新,请运行:
docker-compose pull && docker-compose up -d && docker system prune -a -f