Skip to content

Commit

Permalink
Always use rvm system and also update webpack config (theforeman#599)
Browse files Browse the repository at this point in the history
  • Loading branch information
stbenjam authored Feb 6, 2018
1 parent 2f420c1 commit 9a61d76
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ boxes.yaml
scripts
repo
Gemfile.lock
.ruby-version
.ruby-gemset
*.retry
*.pyc
user_playbooks
Expand Down
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
system
4 changes: 3 additions & 1 deletion docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,11 @@ To work with webpack-dev-server, ensure the following lines are in your `~/forem
This will instruct Foreman to use Webpack from an https source. Now we need to make sure Webpack is using the right certificates to serve the development content through HTTPS. We're going to save these configuration values on `~/foreman/.env`:

```
WEBPACK_OPTS='--https --key /etc/pki/katello/private/katello-default-ca.key --cert /etc/pki/katello/certs/katello-default-ca.crt --cacert /etc/pki/katello/certs/katello-default-ca.crt'
WEBPACK_OPTS='--https --key /etc/pki/katello/private/katello-default-ca.key --cert /etc/pki/katello/certs/katello-default-ca.crt --cacert /etc/pki/katello/certs/katello-default-ca.crt --host 0.0.0.0 --public centos7-devel.example.com'
```

Replace centos7-devel.example.com with the public hostname of your development server, if different.

Remember to run `source ~/foreman/.env` before running your Webpack server, so that the right options to enable HTTPS are loaded.

Additionally, Foreman uses [secureheaders](https://github.com/twitter/secureheaders) to protect users from different attacks. secureheaders will block requests to the webpack development server, as it's not running in localhost:3000. To allow it, change the following lines in `~/foreman/config/initializers/secure_headers.rb`, substituting centos7-devel.example.com for your fqdn, you can get this value by running `hostname -f`.
Expand Down

0 comments on commit 9a61d76

Please sign in to comment.