Error configuring mongodb replicaset with inmemory
Ok what you need to do is to change:

    mongo "${ssl_args[@]}" --eval "rs.initiate({'_id': '$replica_set', 'members': [{'_id': 0, 'host': '$service_name'}]})"


to

    mongo "${ssl_args[@]}" --eval "rs.initiate({'_id': '$replica_set', 'writeConcernMajorityJournalDefault': false, 'members': [{'_id': 0, 'host': '$service_name'}]})"


The data still doesn't persist.