Closed Hukeqing closed 2 years ago
你好,感谢对 PasteMe 的认可。
考虑到你的这个需求,我在后面的版本会加入「允许匿名永久」的选项。
至于历史版本,我仔细看了一下,应该是 release-v3.2.2
version: "3"
services:
pasteme-frontend:
image: pasteme/frontend:3.2.6
container_name: pasteme-frontend
depends_on:
- pasteme-backend
healthcheck:
test: ["CMD", "curl", "-so", "/dev/null", "localhost:8080/usr/config.json"]
interval: 45s
timeout: 3s
retries: 3
restart: always
ports:
- 80:8080
volumes:
- ./data/nginx-logs/:/var/lib/pasteme/
- ./data/frontend-usr/:/www/pasteme/usr/
pasteme-backend:
image: pasteme/go-backend:3.3.2
container_name: pasteme-backend
depends_on:
- pasteme-mysql
healthcheck:
test: ["CMD", "wget", "-O", "/dev/null", "localhost:8000/?method=beat"]
interval: 45s
timeout: 3s
retries: 3
restart: always
volumes:
- ./data/backend-config/:/etc/pastemed/
logging:
driver: "json-file"
options:
max-file: "3"
max-size: "128m"
pasteme-mysql:
image: mysql:5.5
container_name: pasteme-mysql
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
interval: 45s
timeout: 3s
retries: 3
restart: always
command: [
'--character-set-server=utf8mb4',
'--collation-server=utf8mb4_unicode_ci'
]
environment:
MYSQL_USER: username
MYSQL_PASSWORD: password
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: pasteme
MYSQL_MAX_ALLOWED_PACKET: 128M
MYSQL_INNODB_LOG_FILE_SIZE: 64M
volumes:
- ./data/mysql:/var/lib/mysql
logging:
driver: "json-file"
options:
max-file: "3"
max-size: "128m"
感谢帮助,目前来看,可能更加适合在 readme 上进行说明即可,即建议与我有相同需求的可以先部署旧版本的系统
此版本似乎出现了一些问题,点击保存时出现此错误
POST: /api/v3/
{"message":"Request failed with status code 405","name":"Error","stack":"@https://shadow.elemecdn.com/npm/axios@0.19.0/dist/axios.min.js:8:6419\n@https://shadow.elemecdn.com/npm/axios@0.19.0/dist/axios.min.js:8:6258\n@https://shadow.elemecdn.com/npm/axios@0.19.0/dist/axios.min.js:8:5143","config":{"url":"/api/v3/","method":"post","data":"{\"lang\":\"plain\",\"content\":\"123\",\"password\":null}","headers":{"Accept":"application/json, text/plain, */*","Content-Type":"application/json;charset=utf-8"},"transformRequest":[null],"transformResponse":[null],"timeout":0,"xsrfCookieName":"XSRF-TOKEN","xsrfHeaderName":"X-XSRF-TOKEN","maxContentLength":-1}}
可否看一下后端的日志?
docker logs pasteme-backend
检查了一下,在出现问题的时刻,没有错误日志,日志中仅有心跳信息
那有可能是 nginx 端报错了,辛苦看下 nginx 的日志。
cat data/nginx-logs/pasteme.error.log
pasteme.error.log
日志是空的,没有信息,另外一个 pasteme.log
日志内也只有正常的 UA 记录
完全从 0 开始用 docker-compose 部署也还是会有这种问题吗?
解决了,是因为我之前启动过新版本的 PasteMe 导致存在 data 文件夹了
我们现在有一个需求,希望能够在内网环境搭建 pasteme 系统,所以我们更加希望能够使用之前版本的不需要登录即可拥有无限时长的 pasteme 系统,但是我找不到明确标明新版本的 tag,请问能否提供一下原来版本的 docker image version 或者此仓库对应的 log 版本号