I did restore on my secondsite(multisite), but Read-only mode is enabled.
How can I login? or How can I turn off Read-only mode?
I tried:
./launcher enter app
discourse disable_readonly
But nothing’s changed. (I tried ./launcher rebuild app also)
Was there any error when you tried that?
Alternatively, you could try the following
./launcher enter app
rails c
Discourse.disable_readonly_mode
2 Likes
No there was no error
root@localhost-app:/# discourse disable_readonly
The site is now fully operable.
Here I did your instruction:
root@localhost:/var/discourse# ./launcher enter app
WARNING: No swap limit support
root@localhost-app:/# rails c
[1] pry(main)> Discourse.disable_readonly_mode
=> true
But still same situation 
Are you sure you’re disabling readonly mode on the right site? I see you’re using multisite.
You need to do something like
./launcher enter app
RAILS_DB=<NAME_OF_THE_DB> rails c
Discourse.disable_readonly_mode
1 Like
I did
root@localhost-app:/# discourse enable_readonly
The site is now in readonly mode.
root@localhost-app:/# discourse disable_readonly
The site is now fully operable.
root@localhost-app:/#
But it seems it only affects on the first site, not the second site.
(For more info: I configured multisite, and I restored with backup data. Then it happened)
Yes I am using multistite.
I tried with the name of DB ‘secondforum’:
root@localhost-app:/# RAILS_DB=<secondforum> rails c
-bash: secondforum: No such file or directory
Would you provide any example of <NAME_OF_THE_DB> ?
I followed Multisite configuration with Docker
I made it with secondforum instead of b_discourse
It finally worked with secondsite (not b_discourse nor secondforum)
./launcher enter app
RAILS_DB=secondsite rails c
Discourse.disable_readonly_mode
Thank you 