use config;

insert into config (app_id, config_id, config_data)
values ('user-manager','application',
      '{ "appUrl" : "http://localhost:8080" }'
      );

insert into config (app_id, config_id, config_data)
values ('user-manager','database',
      '{
   "url" : "jdbc:mysql://localhost:3306/user_manager",
   "username" : "USERNAME",
   "password" : "PASSWORD"
}'
);
 
insert into config (app_id, config_id, config_data)
values ('user-manager','keycloak',
'{
   "realm": "endeavour2",
   "realm-public-key": "<KEY>",
   "auth-server-url": "https://devauth.endeavourhealth.net/auth",
   "ssl-required": "external",
   "resource": "eds-dsa-manager",
   "public-client": true
 }'
);

insert into config.config
select 'user-manager', 'keycloak_proxy',
'{
  "user" : "eds-ui",
  "pass" : "<PASSWORD>",
  "url" : "https://devauth.endeavourhealth.net/auth"
 }';
 
  
insert into config (app_id, config_id, config_data)
values ('user-manager','machine_user_realm',
'DiscoveryAPI'
);
 
 