# 如何让 Discourse 在其他端口运行

**URL:** <https://www.isharkfly.com/t/discourse/16440>\
**Category:** Discourse\
**Tags:** discourse\
**Created:** [October 20, 2024, 1:24am UTC](https://www.isharkfly.com/t/discourse/16440 "2024-10-20T01:24:26Z")\
**Posts on this page:** 17\
**Page:** 2

<div class="post-metadata">

**Author:** ![CAKE\_NICE](https://www.isharkfly.com/user_avatar/www.isharkfly.com/cake_nice/32/14319_2.png) [@CAKE\_NICE](https://www.isharkfly.com/u/CAKE_NICE)\
**Post date:** [October 22, 2024, 10:29am UTC](https://www.isharkfly.com/t/discourse/16440/21 "2024-10-22T10:29:51Z")

</div>

![image](https://cdn.isharkfly.com/com-isharkfly-www/discourse-uploads/original/2X/9/9f1c5158c03c5100da9a408a5e4565fee8a3cec0.png)

想问一下这个是啥

---

<div class="post-metadata">

**Author:** ![CAKE\_NICE](https://www.isharkfly.com/user_avatar/www.isharkfly.com/cake_nice/32/14319_2.png) [@CAKE\_NICE](https://www.isharkfly.com/u/CAKE_NICE)\
**Post date:** [October 22, 2024, 10:35am UTC](https://www.isharkfly.com/t/discourse/16440/22 "2024-10-22T10:35:21Z")

</div>

discourse-1.yml

是什么，不能直接修改 app.yml 吗？

---

<div class="post-metadata">

**Author:** ![luobo](https://www.isharkfly.com/user_avatar/www.isharkfly.com/luobo/32/15604_2.png) [@luobo](https://www.isharkfly.com/u/luobo)\
**Post date:** [October 22, 2024, 10:38am UTC](https://www.isharkfly.com/t/discourse/16440/23 "2024-10-22T10:38:06Z")

</div>

可以直接修改app.yml，哪个带China的文件，是discourse官方给出的代理文件，就是让在国内的环境下也可以加载到一些国外的插件

discourse-1.yml就是app.yml，只不过我重命名了

---

<div class="post-metadata">

**Author:** ![CAKE\_NICE](https://www.isharkfly.com/user_avatar/www.isharkfly.com/cake_nice/32/14319_2.png) [@CAKE\_NICE](https://www.isharkfly.com/u/CAKE_NICE)\
**Post date:** [October 22, 2024, 10:42am UTC](https://www.isharkfly.com/t/discourse/16440/24 "2024-10-22T10:42:01Z")

</div>

刚刚才看完 原来后面有提到

---

<div class="post-metadata">

**Author:** ![CAKE\_NICE](https://www.isharkfly.com/user_avatar/www.isharkfly.com/cake_nice/32/14319_2.png) [@CAKE\_NICE](https://www.isharkfly.com/u/CAKE_NICE)\
**Post date:** [October 22, 2024, 10:42am UTC](https://www.isharkfly.com/t/discourse/16440/25 "2024-10-22T10:42:29Z")

</div>

我发现 我默认的配置文件

#version: tests-passed

他就是注释掉的

---

<div class="post-metadata">

**Author:** ![luobo](https://www.isharkfly.com/user_avatar/www.isharkfly.com/luobo/32/15604_2.png) [@luobo](https://www.isharkfly.com/u/luobo)\
**Post date:** [October 22, 2024, 10:52am UTC](https://www.isharkfly.com/t/discourse/16440/26 "2024-10-22T10:52:53Z")

</div>

> [@CAKE\_NICE](#):
>
> #version: tests-passed
> 
> 他就是注释掉的

这个不重要，保持默认即可

---

<div class="post-metadata">

**Author:** ![CAKE\_NICE](https://www.isharkfly.com/user_avatar/www.isharkfly.com/cake_nice/32/14319_2.png) [@CAKE\_NICE](https://www.isharkfly.com/u/CAKE_NICE)\
**Post date:** [October 22, 2024, 3:25pm UTC](https://www.isharkfly.com/t/discourse/16440/27 "2024-10-22T15:25:57Z")

</div>

```auto
I, [2024-10-22T15:23:09.643051 #1] INFO -- : Building
Environment: production
building...
undefined
 ERR_PNPM_RECURSIVE_EXEC_FIRST_FAIL Command was killed with SIGKILL (Forced termination): ember build -prod

I, [2024-10-22T15:23:09.647381 #1] INFO -- : Terminating async processes
I, [2024-10-22T15:23:09.647438 #1] INFO -- : Sending INT to HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/13/bin/postmaster -D /etc/postgresql/13/main pid: 39
I, [2024-10-22T15:23:09.647751 #1] INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 107
107:signal-handler (1729610589) Received SIGTERM scheduling shutdown...
2024-10-22 15:23:09.648 UTC [39] LOG: received fast shutdown request
2024-10-22 15:23:09.659 UTC [39] LOG: aborting any active transactions
2024-10-22 15:23:09.670 UTC [39] LOG: background worker "logical replication launcher" (PID 54) exited with exit code 1
2024-10-22 15:23:09.671 UTC [49] LOG: shutting down
107:M 22 Oct 2024 15:23:09.734 # User requested shutdown...
107:M 22 Oct 2024 15:23:09.734 * Saving the final RDB snapshot before exiting.
107:M 22 Oct 2024 15:23:09.778 * DB saved on disk
107:M 22 Oct 2024 15:23:09.778 # Redis is now ready to exit, bye bye...
2024-10-22 15:23:09.792 UTC [39] LOG: database system is shut down

FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake assets:precompile:build' failed with return #<Process::Status: pid 1949 exit 1>
Location of failure: /usr/local/lib/ruby/gems/3.3.0/gems/pups-1.2.1/lib/pups/exec_command.rb:132:in `spawn'
exec failed with the params {"cd"=>"$home", "tag"=>"build", "hook"=>"assets_precompile_build", "cmd"=>["su discourse -c 'bundle exec rake assets:precompile:build'"]}
bootstrap failed with exit code 1
**FAILED TO BOOTSTRAP** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.
62dbd407b7d17e3a9031631307b3c2ee35e098dbe8d844f34086fe2926a909cf
root@hebaodan77:/var/discourse#

```

---

<div class="post-metadata">

**Author:** ![honeymoose](https://www.isharkfly.com/user_avatar/www.isharkfly.com/honeymoose/32/20796_2.png) [@honeymoose](https://www.isharkfly.com/u/honeymoose)\
**Post date:** [October 22, 2024, 3:29pm UTC](https://www.isharkfly.com/t/discourse/16440/28 "2024-10-22T15:29:50Z")

</div>

@CAKE_NICE 是不是你机器配置的 SWAP 缓冲区不够了？

 ![2024-10-22_11-29-00](https://cdn.isharkfly.com/com-isharkfly-www/discourse-uploads/original/2X/f/f84a4e3cd05c337d0ded774c9d55f1de9660cea2.png)

官方的说法是这样。

你的 Swap 缓冲区配了多大呀？

---

<div class="post-metadata">

**Author:** ![CAKE\_NICE](https://www.isharkfly.com/user_avatar/www.isharkfly.com/cake_nice/32/14319_2.png) [@CAKE\_NICE](https://www.isharkfly.com/u/CAKE_NICE)\
**Post date:** [October 22, 2024, 11:59pm UTC](https://www.isharkfly.com/t/discourse/16440/29 "2024-10-22T23:59:02Z")

</div>

没开 SWAP 之前都能正常重构。

---

<div class="post-metadata">

**Author:** ![honeymoose](https://www.isharkfly.com/user_avatar/www.isharkfly.com/honeymoose/32/20796_2.png) [@honeymoose](https://www.isharkfly.com/u/honeymoose)\
**Post date:** [October 23, 2024, 12:36am UTC](https://www.isharkfly.com/t/discourse/16440/30 "2024-10-23T00:36:34Z")

</div>

看这个有可能还是 Swap 交换区的问题。

可能是开了但空间不够也是有可能的。

扩下 Swap 看看？

---

<div class="post-metadata">

**Author:** ![luobo](https://www.isharkfly.com/user_avatar/www.isharkfly.com/luobo/32/15604_2.png) [@luobo](https://www.isharkfly.com/u/luobo)\
**Post date:** [October 23, 2024, 1:49am UTC](https://www.isharkfly.com/t/discourse/16440/31 "2024-10-23T01:49:37Z")

</div>

怪事，我没遇到过这个问题

---

<div class="post-metadata">

**Author:** ![Dummy](https://www.isharkfly.com/letter_avatar_proxy/v4/letter/d/7c8e57/32.png) [@Dummy](https://www.isharkfly.com/u/Dummy)\
**Post date:** [November 11, 2024, 9:51am UTC](https://www.isharkfly.com/t/discourse/16440/32 "2024-11-11T09:51:41Z")

</div>

![1731318627882](https://cdn.isharkfly.com/com-isharkfly-www/discourse-uploads/original/2X/1/1f76a9ddfba33a2eb235112f860fdde9290bafef.png)  
请问你这个是怎么自定义的？

---

<div class="post-metadata">

**Author:** ![luobo](https://www.isharkfly.com/user_avatar/www.isharkfly.com/luobo/32/15604_2.png) [@luobo](https://www.isharkfly.com/u/luobo)\
**Post date:** [November 11, 2024, 10:05am UTC](https://www.isharkfly.com/t/discourse/16440/33 "2024-11-11T10:05:19Z")

</div>

admin是用户名，开启用户全名，并显示用户名即可，后面那个表情是状态，点击右上角的头像，点击用户，点击设置自定义状态即可。

---

<div class="post-metadata">

**Author:** ![Dummy](https://www.isharkfly.com/letter_avatar_proxy/v4/letter/d/7c8e57/32.png) [@Dummy](https://www.isharkfly.com/u/Dummy)\
**Post date:** [November 11, 2024, 10:29am UTC](https://www.isharkfly.com/t/discourse/16440/34 "2024-11-11T10:29:36Z")

</div>

😳全名看到了，但是开启用户全名和设置状态没有看到，是版本问题还是管理设置问题？我自己部署的没看见，这个号也没看到。

---

<div class="post-metadata">

**Author:** ![luobo](https://www.isharkfly.com/user_avatar/www.isharkfly.com/luobo/32/15604_2.png) [@luobo](https://www.isharkfly.com/u/luobo)\
**Post date:** [November 11, 2024, 11:52am UTC](https://www.isharkfly.com/t/discourse/16440/35 "2024-11-11T11:52:35Z")

</div>

> [@Dummy](#):
>
> 开启用户全名和设置状态没有看到

 ![微信截图_20241111195040](https://cdn.isharkfly.com/com-isharkfly-www/discourse-uploads/original/2X/2/24e84624ed752da215b33e1f7ee45c0a37aca125.jpeg)  
 ![微信截图_20241111195137](https://cdn.isharkfly.com/com-isharkfly-www/discourse-uploads/original/2X/1/143bee333dd7a933061cff5747e5fd7aea024424.jpeg)

---

<div class="post-metadata">

**Author:** ![Dummy](https://www.isharkfly.com/letter_avatar_proxy/v4/letter/d/7c8e57/32.png) [@Dummy](https://www.isharkfly.com/u/Dummy)\
**Post date:** [November 11, 2024, 12:10pm UTC](https://www.isharkfly.com/t/discourse/16440/36 "2024-11-11T12:10:08Z")

</div>

！！！全名找到了，谢谢！

我这里没有自定义状态，难怪我找半天😂

找到了，也是在管理员设置，`enable user status`

---

<div class="post-metadata">

**Author:** ![luobo](https://www.isharkfly.com/user_avatar/www.isharkfly.com/luobo/32/15604_2.png) [@luobo](https://www.isharkfly.com/u/luobo)\
**Post date:** [November 11, 2024, 12:27pm UTC](https://www.isharkfly.com/t/discourse/16440/37 "2024-11-11T12:27:47Z")

</div>

> [@Dummy](#):
>
> 你的版本是多少？

版本为： `3.4.0.beta3-dev`  
我也没找到哪里开启这个，我记得我就是默认开启的，也有可能是哪个插件附带的功能。

[Previous page](https://www.isharkfly.com/t/discourse/16440.md?page=1)
