def _create_run_ini(self, port, production, output='<STR_LIT>',<EOL>source='<STR_LIT>', override_site_url=True):
cp = SafeConfigParser()<EOL>try:<EOL><INDENT>cp.read([self.target + '<STR_LIT:/>' + source])<EOL><DEDENT>except ConfigParserError:<EOL><INDENT>raise DatacatsError('<STR_LIT>')<EOL><DEDENT>cp.set('<STR_LIT>', '<STR_LIT>', '<STR_LIT:false>' if production else '<STR_LIT:true>')<EOL>if self.site_url:<EOL><INDENT>site_url = self.site_url<EOL><DEDENT>else:<EOL><INDENT>if is_boot2docker():<EOL><INDENT>web_address = socket.gethostbyname(docker_host())<EOL><DEDENT>else:<EOL><INDENT>web_address = self.address<EOL><DEDENT>site_url = '<STR_LIT>'.format(web_address, port)<EOL><DEDENT>if override_site_url:<EOL><INDENT>cp.set('<STR_LIT>', '<STR_LIT>', site_url)<EOL><DEDENT>cp.set('<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>'<EOL>.format(self.passwords['<STR_LIT>']))<EOL>cp.set('<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>'<EOL>.format(self.passwords['<STR_LIT>']))<EOL>cp.set('<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>'<EOL>.format(self.passwords['<STR_LIT>']))<EOL>cp.set('<STR_LIT>', '<STR_LIT>', '<STR_LIT>')<EOL>cp.set('<STR_LIT>', '<STR_LIT>', '<STR_LIT>')<EOL>cp.set('<STR_LIT>', '<STR_LIT>', self.passwords['<STR_LIT>'])<EOL>if not isdir(self.sitedir + '<STR_LIT>'):<EOL><INDENT>makedirs(self.sitedir + '<STR_LIT>')  <EOL><DEDENT>with open(self.sitedir + '<STR_LIT>' + output, '<STR_LIT:w>') as runini:<EOL><INDENT>cp.write(runini)<EOL><DEDENT>
Create run/development.ini in datadir with debug and site_url overridden
and with correct db passwords inserted