我在最后一次升级后无法进入我的discourse
现在,我也无法重建我的应用
Launcher已更新,正在重启...
x86_64 架构被检测到。
确保Launcher是最新的
正在更新Launcher...
正在更新 721facb..09d5eb6
错误:您的本地更改会被合并覆盖文件:
image/base/Dockerfile
请在合并之前提交您的更改或储存它们。
中止
更新失败
我在最后一次升级后无法进入我的discourse
现在,我也无法重建我的应用
Launcher已更新,正在重启...
x86_64 架构被检测到。
确保Launcher是最新的
正在更新Launcher...
正在更新 721facb..09d5eb6
错误:您的本地更改会被合并覆盖文件:
image/base/Dockerfile
请在合并之前提交您的更改或储存它们。
中止
更新失败
不要直接编辑,按照建议去做吗?
我不修改任何内容,只是升级Discourse。
我该如何修复它?不明白它的建议。
该消息提示你已经编辑了Dockerfile,需要提交更改。
这很奇怪,因为你说你从未编辑过任何文件。
git status 显示了什么?
升级会自动更改它。或者它与新源发生冲突(没有变化,只是假公告)。
/var/discourse# git status
在 main 分支
你的分支落后 'origin/main' 2 个提交,可以快进。
(使用 "git pull" 来更新你的本地分支)
未暂存的更改:
(使用 "git add <文件>..." 来准备提交更改)
(使用 "git restore <文件>..." 来丢弃工作区的更改)
已修改: README.md
已修改: discourse-setup
已修改: image/base/Dockerfile
已修改: image/base/install-imagemagick
已修改: launcher
已修改: templates/import/phpbb3.template.yml
已修改: templates/web.template.yml
未跟踪的文件:
(使用 "git add <文件>..." 包含在即将提交的内容中)
404.html
index.html
没有任何更改被添加到提交(使用 "git add" 和/或 "git commit -a")
这真奇怪。这些变化都是些什么?
你可以使用 git diff
/var/discourse# git diff
diff --git a/README.md b/README.md
index 6f376b6..465f1b8 100644
--- a/README.md
+++ b/README.md
@@ -10,13 +10,8 @@
## Getting Started
-
-👉 [Learn more about Discourse hosting](https://discourse.org/pricing)
-
-The easiest way to get started with self-hosting Discourse is via the standalone template, which can be installed in 30 minutes or less.
-
-For detailed install instructions, check out:
+最简单的入门方法是通过**独立**模板,可以在 30 分钟或更短的时间内安装完成。有关详细的安装说明,请参阅:
https://github.com/discourse/discourse/blob/main/docs/INSTALL-cloud.md
## Directory Structure
diff --git a/discourse-setup b/discourse-setup
index 5adfe13..4545deb 100755
--- a/discourse-setup
+++ b/discourse-setup
@@ -193,11 +193,11 @@ check_disk_and_memory() {
exit 1
fi
- if [ "$avail_mem" -le 4 ]; then
+ if [ "$avail_mem" -le 2 ]; then
total_swap=`free -g --si | awk ' /Swap:/ {print $2} '`
if [ "$total_swap" -lt 2 ]; then
- echo "WARNING: Discourse requires at least 2GB of swap when running with 4GB of RAM"
+ echo "警告:运行内存为 2GB 或更少时,Discourse 需要至少 2GB 的交换空间"
echo "or less. This system does not appear to have sufficient swap space."
echo
echo "Without sufficient swap space, your site may not work properly, and future"
diff --git a/image/base/Dockerfile b/image/base/Dockerfile
index 66de0df..3eab95a 100644
--- a/image/base/Dockerfile
+++ b/image/base/Dockerfile
@@ -2,11 +2,7 @@
# VERSION: release
ARG DEBIAN_RELEASE=bookworm
-
FROM discourse/ruby:3.3.6-${DEBIAN_RELEASE}-slim AS builder
-ARG DEBIAN_RELEASE
-ENV DEBIAN_RELEASE=${DEBIAN_RELEASE}
-RUN echo "deb http://deb.debian.org/debian ${DEBIAN_RELEASE}-backports main" > "/etc/apt/sources.list.d/${DEBIAN_RELEASE}-backports.list"
RUN apt update && \
DEBIAN_FRONTEND=noninteractive apt-get -y install wget \
autoconf build-essential \
@@ -66,9 +62,9 @@ RUN --mount=type=tmpfs,target=/var/log \
libtcmalloc-minimal4 cmake \
pngcrush pngquant ripgrep poppler-utils \
# imagemagick runtime dependencies
- ghostscript libjbig0 libtiff6 libpng16-16 libfontconfig1 \
+ libheif1 libjbig0 libtiff6 libpng16-16 libfontconfig1 \
libwebpdemux2 libwebpmux3 libxext6 librsvg2-2 libgomp1 \
- fonts-urw-base35 libheif1/${DEBIAN_RELEASE}-backports \
+ fonts-urw-base35 \
# nginx runtime dependencies \
nginx-common && \
# install these without recommends to avoid pulling in e.g.
diff --git a/image/base/install-imagemagick b/image/base/install-imagemagick
index b1402bd..9ab268e 100755
--- a/image/base/install-imagemagick
+++ b/image/base/install-imagemagick
@@ -14,17 +14,16 @@ WDIR=/tmp/imagemagick
apt -y -q remove imagemagick
apt -y -q install git make gcc pkg-config autoconf curl g++ yasm cmake \
libde265-0 libde265-dev ${LIBJPEGTURBO} libwebp7 x265 libx265-dev libtool \
- libpng16-16 libpng-dev libwebp-dev libgomp1 libaom-dev \
+ libpng16-16 libpng-dev libwebp-dev libgomp1 \
libwebpmux3 libwebpdemux2 ghostscript libxml2-dev libxml2-utils librsvg2-dev \
- libltdl7-dev libbz2-dev gsfonts libtiff-dev libfreetype6-dev libjpeg-dev
+ libltdl7-dev libbz2-dev gsfonts libtiff-dev libfreetype6-dev libjpeg-dev libheif1 libheif-dev
-if cat /etc/issue | grep -qi Debian; then
- # Get VERSION_CODENAME
- . /etc/os-release
- # Use backports
- apt -y -q install libheif1/$VERSION_CODENAME-backports libheif-dev/$VERSION_CODENAME-backports
+# Ubuntu doesn't like backports
+if cat /etc/issue | grep -qiE 'Debian GNU/Linux 12|Ubuntu 22'; then
+ apt -y install libaom-dev
else
- apt -y -q install libheif1 libheif-dev
+ # Use backports instead of compiling it
+ apt -y -q install -t bullseye-backports libaom-dev
fi
mkdir -p $WDIR
diff --git a/launcher b/launcher
index 750ce3b..db2b25c 100755
--- a/launcher
+++ b/launcher
@@ -92,7 +92,7 @@ kernel_min_version='4.4.0'
config_file=containers/"$config".yml
cidbootstrap=cids/"$config"_bootstrap.cid
local_discourse=local_discourse
-image="discourse/base:2.0.20250226-0128"
+image="discourse/base:2.0.20250129-0720"
docker_path=`which docker.io 2> /dev/null || which docker`
git_path=`which git`
@@ -491,7 +491,7 @@ fi
if [ -d /var/discourse/shared/standalone/postgres_data_old ]; then
echo
- echo "Old PostgreSQL backup data cluster detected taking up $(du -hs /var/discourse/shared/standalone/postgres_data_old | awk '{print $1}')"
+ echo "检测到旧的 PostgreSQL 备份数据集群,占用空间为 $(du -hs /var/discourse/shared/standalone/postgres_data_old | awk '{print $1}')"
read -p "Would you like to remove it? (y/N): " -n 1 -r && echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
diff --git a/templates/import/phpbb3.template.yml b/templates/import/phpbb3.template.yml
index 4744620..3b70cf4 100644
--- a/templates/import/phpbb3.template.yml
+++ b/templates/import/phpbb3.template.yml
@@ -1,8 +1,5 @@
# This template installs MariaDB and all dependencies needed for importing from phpBB3.
-env:
- UNICORN_SIDEKIQS: 0
-
params:
home: /var/www/discourse
@@ -11,14 +8,14 @@
hooks:
- exec:
cd: /etc/service
- cmd:
- - rm -R unicorn
+ cmd:
+ - rm -R unicorn
- rm -R nginx
- rm -R cron
- file:
path: /etc/runit/3.d
- cmd:
- - rm 01-nginx
+ cmd:
+ - rm 01-nginx
- rm 02-unicorn
- file:
diff --git a/templates/web.template.yml b/templates/web.template.yml
index 813a63f..9b541c9 100644
--- a/templates/web.template.yml
+++ b/templates/web.template.yml
@@ -240,10 +240,10 @@ run:
chmod: +x
contents: |
#!/bin/bash
- (cd /var/www/discourse && RAILS_ENV=production sudo -H -E -u discourse bundle exec script/rails "$@")
+ # If they requested a console, load pry instead
+ if [ "$*" == "c" -o "$*" == "console" ]
+ then
+ (cd /var/www/discourse && RAILS_ENV=production sudo -H -E -u discourse bundle exec pry -r ./config/environment)
+ else
+ (cd /var/www/discourse && RAILS_ENV=production sudo -H -E -u discourse bundle exec script/rails "$@")
+ fi
- file:
path: /usr/local/bin/rake
(END)
git reset --hard 将会删除你所有的本地更改,但请确保在运行之前没有你想要保留的更改。
一种更安全的方法可能是:
git stash
然后你就可以继续进行完整的命令行重建。
git reset --hard 看起来没问题。但我需要移除 discourse-multilingual,这个可能会导致错误。
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.