-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
启动服务出现报错 #14
Comments
详细步骤的文档年久失修有些过时了,service 完整的范例大概是这样的: version: "3.8"
x-restart-policy: &restart_policy
restart: unless-stopped
x-defaults: &defaults
<<: *restart_policy
image: ghcr.io/tryzealot/zealot:nightly
depends_on:
- redis
- postgres
env_file: .env
volumes:
- zealot-uploads:/app/public/uploads
- zealot-backup:/app/public/backup
- ./log:/app/log # 持久化日志文件,可选
healthcheck:
test: ["CMD-SHELL", "wget -q --spider --proxy=off localhost/health || exit 1"]
services:
redis:
<<: *restart_policy
image: redis:7-alpine
command: redis-server
volumes:
- zealot-redis:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
postgres:
<<: *restart_policy
image: postgres:14-alpine
volumes:
- zealot-postgres:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: ze@l0t
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres"]
zealot:
<<: *defaults
# 无需反代可开启端口映射,与下面 web 反代服务互斥
ports:
- "80:80"
# 可选:使用反代托管 SSL 证书和服务
web:
image: caddy:2-alpine
ports:
- "80:80"
- "443:443"
volumes:
- ./caddy/etc/caddy/Caddyfile:/etc/caddy/Caddyfile:ro
- ./caddy/etc/caddy/certs:/etc/caddy/certs:ro
env_file: .env
environment:
ACME_AGREE: "true"
# 持久化有三种方式:
volumes:
# 1. docker compose 内部自动生成 volumes
- zealot-uploads
- zealot-backup
- zealot-redis
- zealot-postgres
# 2. docker compose 外部创建的 volumes
zealot-uploads:
external: true
zealot-backup:
external: true
zealot-redis:
external: true
zealot-postgres:
external: true
# 3. 挂载自定义本地路径
zealot-uploads:
driver: local
driver_opts:
o: bind
type: none
device: /tmp/zealot/uploads
zealot-backup:
driver: local
driver_opts:
o: bind
type: none
device: /tmp/zealot/backup
zealot-redis:
driver: local
driver_opts:
o: bind
type: none
device: /tmp/redis
zealot-postgres:
driver: local
driver_opts:
o: bind
type: none
device: /tmp/postgres |
感谢反馈,最新修正的文档已经更新 |
那这样的话,我认为可能不是
我猜测或许是 zealot 中某个 yml 格式有问题,但排查 puma 启动链路的代码,目前没有排查出有异常的 yml 配置。我初次接触 ruby on rails,所以可能排查过程中遗漏了某些东西。 现在对于上面的报错日志,我没有明确的排查思路。我想问问,这份配置在你电脑上可以正常工作吗?
|
我应该找到了问题所在,是 目前我通过将 secrets.yml 中配置设置默认值的方式规避该报错。 |
噢,应该是生成的 secret 字符串有 yaml 无法解析的特殊字符。 |
将 |
我使用 ./deploy 创建的 .env 和容器
Current OS: Darwin x86_64
Docker version: 25.0.3
Docker Compose version: 2.24.5
.env 配置:
执行
docker-compose up
后zealot-1
服务出现报错:我尝试将
docker-compose.yml
的 image 改为最新的ghcr.io/tryzealot/zealot:nightly-2024-03-07
依然出现该问题。同时我注意到《自建服务指南》中提两项配置,当前 master 中的
docker-compose.yml
都没有:zealot-worker
zealot-data
如果是
docker-compose.yml
配置问题,我在哪可以找到可参考的配置?The text was updated successfully, but these errors were encountered: