How to setup both development and production environment

(Bowen Zheng) #1


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!

Developing with Discourse
(Régis Hanol) #2

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 :wink:

(Bowen Zheng) #3


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

(Régis Hanol) #4

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 :wink: