Can DISCOURSE_ENABLE_CORS be set on a running discourse self-hosted site without rebuilding the app image?
I don’t think that the environment variable is used in the rebuild, so you should be able to do this:
./launcher destroy app ./launcher start app
You can do it on a single line with a ; between the two commands. Your site will be down for about a minute while the new container starts up.
Looks like that failed to change.
/var/discourse/launcher destroy app;/var/discourse/launcher start app + /usr/bin/docker stop -t 10 app app + /usr/bin/docker rm app app ./launcher enter app app:/var/www/discourse# echo $DISCOURSE_ENABLE_CORS true
Ended up doing a rebuild.
If it’s the downtime that’s bumming you out, you should move to a two container setup so that downtime is under a minute. I currently charge a premium for this but may have a less expensive offering in the next month.
The downtime is a slight hassle and I was wondering about doing a build on a different device and moving that image over.
That’s sort-of what the two-container thing does. It leaves the old web container running while it builds the new one (and migrates the database and such). When the new image is built, you destroy the old image and crank up the new one. Down time is about a minute.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.