Skip to content

Commit

Permalink
Add recent changes to Local Setup Guides
Browse files Browse the repository at this point in the history
  • Loading branch information
MrSerth committed Aug 16, 2024
1 parent 4fdc343 commit 6ecdc15
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
6 changes: 3 additions & 3 deletions docs/LOCAL_SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,7 @@ rake db:setup

### Start CodeHarbor

For the development environment, three server processes are required:
the Rails server for the main application, a Webpack server providing JavaScript and CSS assets
and the Solid Queue supervisor to process background jobs.
For the development environment, three server processes are required: the Rails server for the main application, a Webpack server providing JavaScript and CSS assets, and the Solid Queue supervisor to process background jobs.

1. Webpack dev server:

Expand All @@ -209,6 +207,8 @@ This will launch the CodeHarbor web application server on port 7500 (default set
bundle exec rake solid_queue:start
```

This will launch the Solid Queue supervisor to process background jobs.

**Check with:**
Open your web browser at <http://localhost:7500>

Expand Down
16 changes: 13 additions & 3 deletions docs/LOCAL_SETUP_VAGRANT.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Vagrant setup

With the Vagrant-based setup, you won't need to (manually) install CodeHarbor and all dependencies on your local instance. Instead, a virtual machine containing all requirements will be configure
With the Vagrant-based setup, you won't need to (manually) install CodeHarbor and all dependencies on your local instance. Instead, a virtual machine containing all requirements will be configured.

## Install VirtualBox

Expand Down Expand Up @@ -73,15 +73,15 @@ During the first start, Vagrant will run a provision script and automatically se

## Start CodeHarbor

For the development environment with Vagrant, two server processes are required: the Rails server for the main application, and a Webpack server providing JavaScript and CSS assets. As those processes will be run in the virtual machine, you always need to connect to the VM with `vagrant ssh`.
For the development environment with Vagrant, three server processes are required: the Rails server for the main application, a Webpack server providing JavaScript and CSS assets, and the Solid Queue supervisor to process background jobs. As those processes will be run in the virtual machine, you always need to connect to the VM with `vagrant ssh`.

1. Webpack dev server:

This project uses [shakapacker](https://github.com/shakacode/shakapacker) to integrate Webpack with Rails to deliver Frontend assets. During development, the `webpack-dev-server` automatically launches together with the Rails server if not specified otherwise. In case of missing JavaScript or stylesheets and for Hot Module Reloading in the browser, you might want to start the `webpack-dev-server` manually *before starting Rails*:

```shell
vagrant ssh
cd codeocean
cd codeharbor
yarn run webpack-dev-server
```

Expand All @@ -97,6 +97,16 @@ This will launch a dedicated server on port 3045 (default setting) and allow inc

This will launch the CodeHarbor web application server on port 7500 (default setting) for all interfaces (`0.0.0.0`) and allow incoming connections from your browser. Listening on all interfaces is required, so that you can connect from your VM-external browser to the Rails server.

3. Solid Queue supervisor:

```shell
vagrant ssh
cd codeharbor
bundle exec rake solid_queue:start
```

This will launch the Solid Queue supervisor to process background jobs.

**Check with:**
Open your web browser at <http://localhost:7500>. Vagrant will redirect requests to your `localhost` automatically to the virtual machine.

Expand Down

0 comments on commit 6ecdc15

Please sign in to comment.