Hi,
I have Discourse installed on two separate Azure VMs (staging and production). Is there a way to automatically deploy changes from staging Discourse to production Discourse?
UI changes (theme) will be managed in a Git repository, so shipping them to production won’t be a problem. The main concern lies in automating the deployment of Discourse settings and configurations to the production environment. How can we achieve this?
You can push the staging container to a repo and then launch it on production. The ./launcher start-cmd app will give you the required stuff to crank up the container in Docker.
You’ll also need to migrate the database (perhaps with SKIP_POST_DEPLOYMENT_MIGRATIONS and then again when the new container has started if you want true zero downtime) and precompile assets.
Some settings live the the database. Others can be set with ENV variables like DISCOURSE_SETTING_NAME (e.g., DISCOURSE_TITLE='my great communiyt')
If you’re not a hobbyist, I recommend two containers, as you have to shut down the database when you start a new container so you can’t have zero downtime. But it would work with a single container.