在 container/app.yml 中设置自定义docker网络

你好,

我该如何在 Discourse 配置文件(container/app.yml)中添加如下示例的自定义 Docker 网络块?
我希望在运行 ./launcher rebuild app 并启动后,Discourse 容器能够连接到 “my-network”。

## 这是 Discourse Docker 容器的全功能独立模板
##
## 修改此文件后,您必须重新构建
## /var/discourse/launcher rebuild app
##
## 编辑时请*务必*格外小心!
## YAML 文件对空格或缩进错误极其敏感!
## 如有需要,请访问 http://www.yamllint.com/ 验证此文件

templates:
  - "templates/postgres.template.yml"
  - "templates/redis.template.yml"
  - "templates/web.template.yml"
  - "templates/web.ratelimited.template.yml"

....

## 构建后需要运行的任何自定义命令
run:
  - exec: echo "开始自定义命令"
  ## 如果您想设置首次注册时的发件人邮箱地址,请取消注释并修改:
  ## 收到首次注册邮件后,请重新注释该行。它只需运行一次。
  #- exec: rails r "SiteSetting.notification_email='info@unconfigured.discourse.org'"
  - exec: echo "自定义命令结束"

networks:
   my-network:
     external: true

网络块:

networks:
   my-network:
     external: true
2 个赞

有回复吗?我需要你的帮助。