mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 20:44:04 +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.
|
# zulip/urls.py.
|
||||||
cmds = [['./tools/compile-handlebars-templates', 'forever'],
|
cmds = [['./tools/compile-handlebars-templates', 'forever'],
|
||||||
['python', 'manage.py', 'rundjango'] +
|
['python', 'manage.py', 'rundjango'] +
|
||||||
manage_args + ['localhost:%d' % (django_port,)],
|
manage_args + ['127.0.0.1:%d' % (django_port,)],
|
||||||
['python', '-u', 'manage.py', 'runtornado'] +
|
['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,
|
['./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']]
|
'./puppet/zulip/files/postgresql/process_fts_updates']]
|
||||||
if options.test:
|
if options.test:
|
||||||
# Webpack doesn't support 2 copies running on the same system, so
|
# 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('/json/events') or
|
||||||
request.uri.startswith('/api/v1/events') or
|
request.uri.startswith('/api/v1/events') or
|
||||||
request.uri.startswith('/sockjs')):
|
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
|
elif (request.uri.startswith('/webpack') or
|
||||||
request.uri.startswith('/socket.io')):
|
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:
|
try:
|
||||||
reactor.listenTCP(proxy_port, server.Site(Resource()), interface=options.interface)
|
reactor.listenTCP(proxy_port, server.Site(Resource()), interface=options.interface)
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
entry: [
|
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'
|
'./static/js/src/main.js'
|
||||||
],
|
],
|
||||||
devtool: 'eval',
|
devtool: 'eval',
|
||||||
output: {
|
output: {
|
||||||
publicPath: 'http://localhost:9991/webpack/',
|
publicPath: 'http://127.0.0.1:9991/webpack/',
|
||||||
path: './static/js',
|
path: './static/js',
|
||||||
filename: 'bundle.js'
|
filename: 'bundle.js'
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user