development:
  clients:
    default:
      uri: <%= ENV["MONGODB_URI"] || "mongodb://localhost/govuk_content_development" %>
      options:
        write:
          w: 1

test:
  clients:
    default:
      uri: <%= ENV["TEST_MONGODB_URI"] || "mongodb://localhost/specialist_publisher_rebuild_test" %>
      options:
        write:
          w: 1

production:
  clients:
    default:
      uri: <%= ENV["MONGODB_URI"] %>
      options:
        write:
          w: majority

development:
  clients:
    default:
      uri: <%= ENV["MONGODB_URI"] || "mongodb://localhost/govuk_content_development" %>
      options:
        write:
          w: 1

test:
  clients:
    default:
      uri: <%= ENV["TEST_MONGODB_URI"] || "mongodb://localhost/specialist_publisher_rebuild_test" %>
      options:
        write:
          w: 1

production:
  clients:
    default:
      uri: <%= ENV["MONGODB_URI"] %>
      options:
        write:
          w: <%= ENV["MONGO_WRITE_CONCERN"] || "majority" %>

Add ENV var to allow setting Mongo write mode
Add ENV var to allow setting Mongo write mode

This allows us to run the content store in a production like
state without requiring multiple Mongo instances to be present.

This is currently utilised as part of running the E2E tests
in production.
