mirror of
				https://github.com/zulip/zulip.git
				synced 2025-10-31 03:53:50 +00:00 
			
		
		
		
	run-dev: Hardcode 127.0.0.1 rather than localhost.
Using "localhost" is problematic in Travis CI, where they have /etc/hosts configured to make `localhost` resolve to both 127.0.0.1 and ::1.
This commit is contained in:
		| @@ -96,11 +96,11 @@ os.setpgrp() | ||||
| # zulip/urls.py. | ||||
| cmds = [['./tools/compile-handlebars-templates', 'forever'], | ||||
|         ['python', 'manage.py', 'rundjango'] + | ||||
|           manage_args + ['localhost:%d' % (django_port,)], | ||||
|           manage_args + ['127.0.0.1:%d' % (django_port,)], | ||||
|         ['python', '-u', 'manage.py', 'runtornado'] + | ||||
|           manage_args + ['localhost:%d' % (tornado_port,)], | ||||
|           manage_args + ['127.0.0.1:%d' % (tornado_port,)], | ||||
|         ['./tools/run-dev-queue-processors'] + manage_args, | ||||
|         ['env', 'PGHOST=localhost', # Force password authentication using .pgpass | ||||
|         ['env', 'PGHOST=127.0.0.1', # Force password authentication using .pgpass | ||||
|          './puppet/zulip/files/postgresql/process_fts_updates']] | ||||
| if options.test: | ||||
|     # Webpack doesn't support 2 copies running on the same system, so | ||||
| @@ -123,13 +123,13 @@ class Resource(resource.Resource): | ||||
|             request.uri.startswith('/json/events') or | ||||
|             request.uri.startswith('/api/v1/events') or | ||||
|             request.uri.startswith('/sockjs')): | ||||
|             return proxy.ReverseProxyResource('localhost', tornado_port, '/'+name) | ||||
|             return proxy.ReverseProxyResource('127.0.0.1', tornado_port, '/'+name) | ||||
|  | ||||
|         elif (request.uri.startswith('/webpack') or | ||||
|               request.uri.startswith('/socket.io')): | ||||
|             return proxy.ReverseProxyResource('localhost', webpack_port, '/'+name) | ||||
|             return proxy.ReverseProxyResource('127.0.0.1', webpack_port, '/'+name) | ||||
|  | ||||
|         return proxy.ReverseProxyResource('localhost', django_port, '/'+name) | ||||
|         return proxy.ReverseProxyResource('127.0.0.1', django_port, '/'+name) | ||||
|  | ||||
| try: | ||||
|     reactor.listenTCP(proxy_port, server.Site(Resource()), interface=options.interface) | ||||
|   | ||||
| @@ -1,11 +1,11 @@ | ||||
| module.exports = { | ||||
|     entry: [ | ||||
|         'webpack-dev-server/client?http://localhost:9991/socket.io', | ||||
|         'webpack-dev-server/client?http://127.0.0.1:9991/socket.io', | ||||
|         './static/js/src/main.js' | ||||
|     ], | ||||
|     devtool: 'eval', | ||||
|     output: { | ||||
|         publicPath: 'http://localhost:9991/webpack/', | ||||
|         publicPath: 'http://127.0.0.1:9991/webpack/', | ||||
|         path: './static/js', | ||||
|         filename: 'bundle.js' | ||||
|     }, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user