Skip to content

feat: apply latest image during Docker updates - #32

Closed
lezi-fun wants to merge 3 commits into
nextfrom
feat/forum-settings-uploads-motion
Closed

lezi-fun wants to merge 3 commits into
nextfrom
feat/forum-settings-uploads-motion

Conversation

@lezi-fun

@lezi-fun lezi-fun commented Aug 14, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • add scripts/update-docker.sh with Docker Compose v2 and v1 support
  • pull the latest app image, then run up -d --no-deps app so Compose recreates the app only when the image changed
  • keep the PostgreSQL container and data volume running during updates
  • remove download/install.sh from this PR

Validation

  • bash -n scripts/update-docker.sh
  • docker compose config
  • mocked Docker Compose v2 and v1 command paths
  • verified neither tracked nor local update flows contain --force-recreate
  • git diff --check

Notes

  • the locally retained installer is excluded from Git and is not part of this PR
  • bot installer feedback was applied and tested locally only

@forumlify forumlify Bot added the documentation Improvements or additions to documentation label Aug 14, 2026
@forumlify

forumlify Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Possible duplicate (possible confidence): #27

PR #27 also updates install-related references to the renamed forumlify/public repo, but it only changed README links (git clone, docker pull), while #32 adds a new download/install.sh installer and updates the install/update/status/cleanup flows. The outcome is related but not substantially identical.

Related item: #27

This is an automated similarity suggestion. The item has not been closed automatically.

@forumlify

forumlify Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Automated review has started. I am checking this pull request now.

@codecov

codecov Bot commented Aug 14, 2026

Copy link
Copy Markdown

Bundle Report

Bundle size has no change ✅

Affected Assets, Files, and Routes:

view changes for bundle: forumlify-next-client-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
static/EMhzZOrOLS3PowGK-*.js (New) 77 bytes 77 bytes 100.0% 🚀
static/EMhzZOrOLS3PowGK-*.js (New) 1.97kB 1.97kB 100.0% 🚀
server/app/api/auth/recovery-*.js -6 bytes 373 bytes -1.58%
server/app/api/auth/recovery-*.js 6 bytes 379 bytes 1.61%
server/app/api/custom-*.js -4 bytes 343 bytes -1.15%
server/app/api/custom-*.js 4 bytes 347 bytes 1.17%
static/-*.js (Deleted) -77 bytes 0 bytes -100.0% 🗑️
static/-*.js (Deleted) -1.97kB 0 bytes -100.0% 🗑️

@codecov

codecov Bot commented Aug 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

forumlify[bot]

This comment was marked as outdated.

@lezi-fun lezi-fun changed the title docs: add installer for renamed repository feat: apply latest image during Docker updates Aug 14, 2026
@forumlify

forumlify Bot commented Aug 14, 2026 •

Copy link
Copy Markdown
Contributor

Automated review completed for commit 52adf7620d06. The latest review result and ghbot review check now reflect this commit.

@forumlify forumlify Bot added enhancement New feature or request and removed documentation Improvements or additions to documentation labels Aug 14, 2026
forumlify[bot]

This comment was marked as outdated.

@forumlify
forumlify Bot dismissed their stale review August 14, 2026 08:31

Superseded by the automated review for commit 52adf76.

@forumlify forumlify Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review

Mode: normal

Comment

The PR is now scoped to the Docker update workflow: a small, readable scripts/update-docker.sh with Compose v2/v1 fallback, the registry re-point to ghcr.io/forumlify/public:next, and updated README instructions. The previously reviewed download/install.sh (including its corrupt pid-file bug) is no longer part of this diff, and I found no blocking defects in the remaining changes. One non-blocking operational gap worth addressing: --no-deps means the database container is never started by the updater, so the script can report success while the app fails to connect if Postgres is down.

Result for maintainers

Adds scripts/update-docker.sh (Compose v2/v1 detection, pull app image, then up -d --no-deps app so only the app container is recreated when the image changes), re-points the app image and clone URL to the renamed forumlify/public repository, and rewrites the Docker-update docs. download/install.sh is removed from the PR, so the earlier pid-file finding no longer applies. The only remaining observation is non-blocking: the updater never starts the db service, so a stopped database container leaves the app down while the script reports success.

Model decision: safe to merge
Applied review policy: allow
Final status: safe to merge

Required changes: 0
Review notes: 1

Comment thread scripts/update-docker.sh
"${compose[@]}" pull app

echo "Applying the latest image to the Forumlify app container..."
"${compose[@]}" up -d --no-deps app

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review note: Update can leave the app down when the database container is not already running

up -d --no-deps app never starts the db service, so if the Postgres container is not already up (e.g., stopped after a host reboot, or the user runs the update script on a freshly cloned stack without first starting it), the app container starts, cannot reach the database, and the script still prints success at the end. Consider dropping --no-deps (db is not recreated anyway since its config does not change) or explicitly verifying the database container is running before applying the update.

@forumlify
forumlify Bot dismissed their stale review August 14, 2026 08:31

Superseded by the automated review for commit 52adf76.

@lezi-fun

Copy link
Copy Markdown
Collaborator Author

@bot 这个pr主要做了什么

@forumlify

forumlify Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

这个 PR 主要做了以下几件事:

1. 新增 scripts/update-docker.sh 更新脚本

  • 自动检测 Docker Compose 版本:优先用 v2(docker compose),没有则回退到 v1(docker-compose),都没有则报错退出。
  • 先 pull app 拉取最新镜像,再执行 up -d --no-deps app,让 Compose 仅在镜像发生变化时重新创建应用容器。
  • 更新过程中 PostgreSQL 容器和数据卷(db_data)保持运行,不会被重建。

2. 更新 docker-compose.yml

  • 应用镜像地址从 ghcr.io/furrium/forumlify:next 改为 ghcr.io/forumlify/public:next(对应仓库迁移到 forumlify/public)。

3. 更新 README.md

  • 克隆地址同步改为 https://github.com/forumlify/public.git(目录名改为 public)。
  • Docker 更新章节从"手动 pull + down/up"改为推荐直接运行 ./scripts/update-docker.sh,并说明了脚本的行为。

简单来说:把 Docker 更新流程从手动操作封装成一个幂等脚本,核心收益是——只更新应用容器,数据库容器和数据卷不中断,避免更新时数据服务停摆;同时把镜像仓库地址迁移到了新的 forumlify/public 仓库。

@forumlify forumlify deleted a comment from forumlify Bot Aug 14, 2026
@lezi-fun

Copy link
Copy Markdown
Collaborator Author

/conflict

@forumlify

forumlify Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Conflict resolution requested by @lezi-fun. forumlify bot is resolving the current head and will push only after the configured validation and a separate final confirmation pass succeed.

@forumlify

forumlify Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

The focused validation-repair pass exceeded its 5-minute limit. No commit was pushed.

@lezi-fun lezi-fun closed this Aug 14, 2026
@forumlify forumlify Bot mentioned this pull request Aug 14, 2026
5 of 9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant