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

Refs #12364 - webpack server can serve assets on https #3734

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion Procfile
@@ -1,4 +1,5 @@
# Run Rails & Webpack concurrently
# If you wish to use a different server then the default, use e.g. `export RAILS_STARTUP='puma -w 3 -p 3000 --preload'`
rails: [ -n "$RAILS_STARTUP" ] && $RAILS_STARTUP || bin/rails server -b 0.0.0.0
webpack: ./node_modules/.bin/webpack-dev-server --config config/webpack.config.js
# you can use WEBPACK_OPTS to customize webpack server, e.g. 'WEBPACK_OPTS='--https --key /path/to/key --cert /path/to/cert.pem --cacert /path/to/cacert.pem' foreman start '
webpack: ./node_modules/.bin/webpack-dev-server --config config/webpack.config.js $WEBPACK_OPTS
1 change: 1 addition & 0 deletions config/environments/development.rb
Expand Up @@ -52,4 +52,5 @@

#Allow disabling the webpack dev server from the settings
config.webpack.dev_server.enabled = SETTINGS.fetch(:webpack_dev_server, true)
config.webpack.dev_server.https = SETTINGS.fetch(:webpack_dev_server_https, false)
end
5 changes: 5 additions & 0 deletions config/settings.yaml.example
Expand Up @@ -21,6 +21,11 @@
# Make sure to run `rake webpack:compile` if disabled.
:webpack_dev_server: true

# If you run Foreman in development behind some proxy or use HTTPS you need
# to enable HTTPS for webpack dev server too, otherwise you'd get mixed content
# errors in your browser
:webpack_dev_server_https: false

# Local administrative settings for application domain, fqdn, foreman URL,
# administrator email address etc. If you don't have a Puppet provisioning
# system you may want to change to setup your project on your local machine.
Expand Down