Skip to content

Docker 改用 caddy 作为默认的 web 服务#540

Merged
icyleaf merged 3 commits into
developfrom
refactor/switch-caddy-as-default-server
Aug 11, 2021
Merged

Docker 改用 caddy 作为默认的 web 服务#540
icyleaf merged 3 commits into
developfrom
refactor/switch-caddy-as-default-server

Conversation

@icyleaf

@icyleaf icyleaf commented Aug 6, 2021

Copy link
Copy Markdown
Member

鉴于使用 s6-overlay 启动的优势可以把一些服务并行放到镜像里面,作为 rails 直接崩掉会影响显示的同时,后续在做热重启的时候可以利用反代服务器再做一次防御和显示处理。

目的

  • 使用 Caddy 作为 puma 的反代服务器
  • 静态文件全部交由 caddy 处理,rails 不再托管来加速 zealot 更快的启动和响应

重大变更

  • 对外暴露的端口从 3000 变为 80
  • volume 建议从 /app/public 分拆为 /app/public/uploads/app/public/backup 两个路径做数据持久化。如果还是继续使用之前的持久化将会出现更新镜像版本后但资源不会更新进而影响正常服务的使用

配套动作

@icyleaf icyleaf force-pushed the refactor/switch-caddy-as-default-server branch from b1c81e9 to 7b11e3a Compare August 11, 2021 09:55
@icyleaf icyleaf force-pushed the refactor/switch-caddy-as-default-server branch from 7b11e3a to 0f6dca9 Compare August 11, 2021 10:02
@icyleaf icyleaf merged commit 4501b31 into develop Aug 11, 2021
@icyleaf icyleaf deleted the refactor/switch-caddy-as-default-server branch August 11, 2021 10:02
icyleaf added a commit to tryzealot/zealot-docker that referenced this pull request Aug 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant