# העתקת קובץ מותאם אישית בקונטיינר discourse בזמן הבנייה

**URL:** https://meta.discourse.org/t/copy-custom-file-in-discourse-container-while-build/284185
**Category:** Self-hosting
**Created:** [2 בנובמבר,‏ 2023,‏ 8:29am UTC](https://meta.discourse.org/t/copy-custom-file-in-discourse-container-while-build/284185 "2023-11-02T08:29:16Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Jishan\_Ansari](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jishan_ansari/32/337293_2.png) [@Jishan\_Ansari](https://meta.discourse.org/u/Jishan_Ansari)
#### Post date: [2 בנובמבר,‏ 2023,‏ 8:29am UTC](https://meta.discourse.org/t/copy-custom-file-in-discourse-container-while-build/284185/1 "2023-11-02T08:29:16Z")

</div>

any one help me  
i make custom code add in app.yml

```plaintext
run:
  - exec: chmod -R 777 /var/www/discourse/customize
  - exec: chmod -R 777 /var/www/discourse/app/controllers/
  - exec: mkdir -p /var/www/discourse/controll
  - exec: chmod -R 777 /var/www/discourse/controll
  - exec: chown discourse:discourse /var/www/discourse/controll
  - exec: cp /var/www/discourse/customize/static_controller.rb /var/www/discourse/controll
  - exec: cp /var/www/discourse/customize/routes.rb /var/www/discourse/controll
  - exec: cp /var/www/discourse/customize/site_settings.yml /var/www/discourse/controll

run:
  - exec: echo "Copying file to /var/www/discourse/app/controller"
  - exec: chmod -R 777 /var/www/discourse/config

```

all things running successfully  
but i use mv command its break the code

```plaintext
  - exec: mv /var/www/discourse/controll/routes.rb /var/www/discourse/config

```

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [2 בנובמבר,‏ 2023,‏ 8:43am UTC](https://meta.discourse.org/t/copy-custom-file-in-discourse-container-while-build/284185/2 "2023-11-02T08:43:33Z")

</div>

Look at how [Discourse Chatbot 🤖](https://meta.discourse.org/t/discourse-chatbot-now-smarter-than-chatgpt/256652) or [Discourse Frotz 🧙](https://meta.discourse.org/t/discourse-frotz-an-interactive-fiction-game-bot/140617) do it in the setup instructions.

---

<div class="post-metadata">

### Author: ![Jishan\_Ansari](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jishan_ansari/32/337293_2.png) [@Jishan\_Ansari](https://meta.discourse.org/u/Jishan_Ansari)
#### Post date: [2 בנובמבר,‏ 2023,‏ 10:33am UTC](https://meta.discourse.org/t/copy-custom-file-in-discourse-container-while-build/284185/3 "2023-11-02T10:33:13Z")

</div>

any another way

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [2 בנובמבר,‏ 2023,‏ 4:45pm UTC](https://meta.discourse.org/t/copy-custom-file-in-discourse-container-while-build/284185/5 "2023-11-02T16:45:52Z")

</div>

> [@Jishan\_Ansari](#):
>
> but i use mv command its break the code

My best guess is that the file you’re trying to copy isn’t there or the destination doesn’t exist. The answer should be in the logs.

> [@Jishan\_Ansari](#):
>
> any another way

You should probably do whatever you’re trying to do in a plugin.

---

<div class="post-metadata">

### Author: ![Jishan\_Ansari](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jishan_ansari/32/337293_2.png) [@Jishan\_Ansari](https://meta.discourse.org/u/Jishan_Ansari)
#### Post date: [3 בנובמבר,‏ 2023,‏ 6:04am UTC](https://meta.discourse.org/t/copy-custom-file-in-discourse-container-while-build/284185/6 "2023-11-03T06:04:46Z")

</div>

ruby script file copy done but main issue i customised ruby code than its give error 502 bad gateway
