# Comment configurer à la fois l'environnement de développement et de production

**URL:** https://meta.discourse.org/t/how-to-setup-both-development-and-production-environment/47040
**Category:** Support
**Created:** [Juillet 9, 2016, 5:58 UTC](https://meta.discourse.org/t/how-to-setup-both-development-and-production-environment/47040 "2016-07-09T17:58:54Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Bowen\_Zheng](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bowen_zheng/32/121663_2.png) [@Bowen\_Zheng](https://meta.discourse.org/u/Bowen_Zheng)
#### Post date: [Juillet 9, 2016, 5:58 UTC](https://meta.discourse.org/t/how-to-setup-both-development-and-production-environment/47040/1 "2016-07-09T17:58:54Z")

</div>

Hi,

I’m new to Discourse and Ruby, so forgive me for asking such simple question. But I have a production website with Docker running on my DigitalOcean server and a development version with Vagrant running on my Mac. Is this the proper setup? Or should I make both environments on my server? After tweaking and developing in the development environment, what’s the best practice to deploy everything I did to the server? Please help me with this or suggest me a tutorial if possible. Thank you so much!

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [Juillet 10, 2016, 11:31 UTC](https://meta.discourse.org/t/how-to-setup-both-development-and-production-environment/47040/2 "2016-07-10T11:31:08Z")

</div>

What kind of changes are you doing locally? If they’re only CSS/HTML changes, then a customization is enough. If you want to change some ruby code or do advanced changes to the UI, then I’d highly recommend that you build a plugin instead. Will be much easier to deploy your changes to production and also you to keep your Discourse version up to date more easily 😉

---

<div class="post-metadata">

### Author: ![Bowen\_Zheng](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bowen_zheng/32/121663_2.png) [@Bowen\_Zheng](https://meta.discourse.org/u/Bowen_Zheng)
#### Post date: [Juillet 10, 2016, 12:13 UTC](https://meta.discourse.org/t/how-to-setup-both-development-and-production-environment/47040/3 "2016-07-10T12:13:52Z")

</div>

Hi,

Thanks for your quick reply. I’m doing things more complicated than just changing the look. Thus, I’m hoping that I can set up an environment on my Mac and tinker with Discourse’s code. I tried the tutorials from the forum but none of them talks about what to do after finished setting up a local environment. How can I deploy the code I changed to affect the production environment? Thanks

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [Juillet 10, 2016, 4:14 UTC](https://meta.discourse.org/t/how-to-setup-both-development-and-production-environment/47040/4 "2016-07-10T16:14:35Z")

</div>

Like I said you are better off writing a plugin. Then it’s just a matter of adding one line in the `app.yml` file and do a rebuild 😉

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [Juin 8, 2024, 12:45 UTC](https://meta.discourse.org/t/how-to-setup-both-development-and-production-environment/47040/5 "2024-06-08T12:45:31Z")

</div>

Ce sujet a été automatiquement fermé après 2890 jours. Les nouvelles réponses ne sont plus autorisées.
