set postgres instance as readonly with no master I have a pg 10 instance that I want to behave as a read only/replica/standby instance.

There is no master, only that read only database and I want the query select pg_is_in_recovery(); to return true to satisfy a monitoring check.

I have tried add a recovery.conf file in the data dir with standby_mode = 'on' as content then SELECT pg_reload_conf(); but I still get false to select pg_is_in_recovery();

office-accounting=# SELECT pg_read_file('recovery.conf');
    pg_read_file
---------------------
 standby_mode = 'on'+

(1 row)

office-accounting=# select pg_is_in_recovery();
 pg_is_in_recovery
-------------------
 f
(1 row)
You probably haven't set up replication properly. The recovery.conf file needs something like this:
standby_mode = 'on'
primary_conninfo = 'host=127.0.0.1 port=5888 user=replicator password=xxx'
trigger_file = 'postgresql_xxx_12345.trigger'

The port should/can be a port that isn't used. The cluster will try to connect there - and fail but it will come online and allow read-only connections as if it is a slave. Which it is actually, with its imaginary master being down for the moment and indefinitely.
A side effect that you probably want to avoid - disable logging perhaps? - is that the log will be full of errors, of the streaming replication connect failures:

2017-12-05 22:19:08 UTC [18096-1] FATAL:  could not connect to the
primary server: could not connect to server: Connection refused       Is
the server running on host &quot;127.0.0.1&quot; and accepting      TCP/IP
connections on port 5888?
2017-12-05 22:19:13 UTC [18099-1] FATAL:
could not connect to the primary server: could not connect to server:
Connection refused        Is the server running on host &quot;127.0.0.1&quot; and
accepting         TCP/IP connections on port 5888?
2017-12-05 22:19:18 UTC
[18103-1] FATAL:  could not connect to the primary server: could not
connect to server: Connection refused         Is the server running on host
&quot;127.0.0.1&quot; and accepting         TCP/IP connections on port 5888?