Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allows webpack to work with kobo-install when it doesn't run from the host OS. #2042

Merged
merged 2 commits into from
Nov 5, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion kobo/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,12 @@ def __init__(self, *args, **kwargs):
'handlers': ['console'],
'level': 'DEBUG',
'propagate': True
}
},
'django.db.backends': {
'level': 'ERROR',
'handlers': ['console'],
'propagate': True
},
}
}

Expand Down
9 changes: 7 additions & 2 deletions webpack/dev.server.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ const path = require('path');
const webpack = require('webpack');
const WebpackCommon = require('./webpack.common');
const BundleTracker = require('webpack-bundle-tracker');
var publicPath = 'http://localhost:3000/static/compiled/';
var isPublicDomainDefined = process.env.KOBOFORM_PUBLIC_SUBDOMAIN &&
process.env.PUBLIC_DOMAIN_NAME;
var publicDomain = isPublicDomainDefined ? process.env.KOBOFORM_PUBLIC_SUBDOMAIN
+ '.' + process.env.PUBLIC_DOMAIN_NAME : 'localhost';
var publicPath = 'http://' + publicDomain + ':3000/static/compiled/';

module.exports = WebpackCommon({
mode: "development",
Expand All @@ -22,7 +26,8 @@ module.exports = WebpackCommon({
disableHostCheck: true,
hot: true,
headers: {'Access-Control-Allow-Origin': '*'},
port: 3000
port: 3000,
host: '0.0.0.0'
},
plugins: [
new BundleTracker({path: __dirname, filename: '../webpack-stats.json'}),
Expand Down