Browse Source

minimal changes to swap default ports

pull/84/head
adam j hartz 2 weeks ago
parent
commit
d188b8076d
6 changed files with 19 additions and 19 deletions
  1. +4
    -4
      catsoop/base_context.py
  2. +2
    -2
      catsoop/scripts/configure.py
  3. +3
    -3
      catsoop/test/test_lti.py
  4. +1
    -1
      website/docs/contributing/hacking/content.catsoop
  5. +2
    -2
      website/docs/installing/content.catsoop
  6. +7
    -7
      website/docs/installing/server_configuration/content.catsoop

+ 4
- 4
catsoop/base_context.py View File

@@ -66,7 +66,7 @@ cs_data_root = r"/home/catsoop/data"
The directory where CAT-SOOP's data files are located (no trailing slash).
"""

cs_url_root = "http://localhost:6010"
cs_url_root = "http://localhost:7667"
"""
The URL root (without trailing slash). Going to this URL should lead the user
to CAT-SOOP's information page.
@@ -243,13 +243,13 @@ default values to use for that question type. These values are loaded in
before the values in a <question> tag are evaluated.
"""

cs_checker_websocket = "ws://localhost:6011"
cs_checker_websocket = "ws://localhost:7668"
"""
Special: The location to which the browser should connect to the checker's
"reporter" process.
"""

cs_checker_server_port = 6011
cs_checker_server_port = 7668
"""
Special: The local port on which the websocket server should run
"""
@@ -274,7 +274,7 @@ cs_wsgi_server = "cheroot"
The WSGI server to use. Currently, must be 'cheroot' or 'uwsgi'
"""

cs_wsgi_server_port = 6010
cs_wsgi_server_port = 7667
"""
Special: The local port on which the WSGI server should run.
"""


+ 2
- 2
catsoop/scripts/configure.py View File

@@ -434,14 +434,14 @@ def configure_production():
# Web Stuff
cs_url_root = ask(
QUESTION("What is the root public-facing URL associated with this instance?"),
default="http://localhost:6010",
default="http://localhost:7667",
transform=lambda x: x.rstrip("/"),
)
cs_checker_websocket = ask(
QUESTION(
"What is the public-facing URL associated with the checker's websocket connection?"
),
default="ws://localhost:6011",
default="ws://localhost:7668",
transform=lambda x: x.rstrip("/"),
)



+ 3
- 3
catsoop/test/test_lti.py View File

@@ -63,7 +63,7 @@ class Test_LTI(CATSOOPTest):

def skip_test_lti_auth0(self):
path = "/_lti/%s/structure" % self.cname
host = "localhost:6010"
host = "localhost:7667"
url = "http://%s%s" % (host, path)
ltic = lti.LTI_Consumer(lti_url=url, consumer_key=self.ckey, secret=self.secret)
data = ltic.lti_context
@@ -83,7 +83,7 @@ class Test_LTI(CATSOOPTest):
Test successful authentication with LTI protocol
"""
path = "/_lti/foo"
host = "localhost:6010"
host = "localhost:7667"
url = "http://%s%s" % (host, path)
ltic = lti.LTI_Consumer(
lti_url=url,
@@ -122,7 +122,7 @@ class Test_LTI(CATSOOPTest):
Test LTI access to courseware
"""
path = "/_lti/course/%s/structure" % self.cname
host = "localhost:6010"
host = "localhost:7667"
url = "http://%s%s" % (host, path)
ltic = lti.LTI_Consumer(lti_url=url, consumer_key=self.ckey, secret=self.secret)



+ 1
- 1
website/docs/contributing/hacking/content.catsoop View File

@@ -79,7 +79,7 @@ and then you can start the server with:
$ catsoop start
```

and navigate your browser to `http://localhost:6010`.
and navigate your browser to `http://localhost:7667`.

In order for this page to be interesting, you will want to put a course in the
CAT-SOOP data root (default: `~/.local/share/catsoop`). You may wish to clone


+ 2
- 2
website/docs/installing/content.catsoop View File

@@ -112,8 +112,8 @@ To start the server, you should run:
$ catsoop start
```

This will start the server listening on port 6010. You should then be able to
directy your browser to `http://localhost:6010` to see the CAT-SOOP instance.
This will start the server listening on port 7667. You should then be able to
directy your browser to `http://localhost:7667` to see the CAT-SOOP instance.


<section>(Optional) Sign Up for Mailing List(s)</section>


+ 7
- 7
website/docs/installing/server_configuration/content.catsoop View File

@@ -18,8 +18,8 @@ To start, double-check the following values in `config.py`:
For example:

```
cs_url_root = 'http://localhost:6010'
cs_checker_websocket = 'ws://localhost:6011'
cs_url_root = 'http://localhost:7667'
cs_checker_websocket = 'ws://localhost:7668'
```

Typically, on a public-facing server, `cs_url_root` will start with `https`,
@@ -34,8 +34,8 @@ the web server's user has read/write access.</p>
</div>

By default, running `catsoop start` will start several processes. The most
important are the UWSGI server (default port `6010`) and the websocket server
(default port `6011`). You can change these ports by setting additional
important are the UWSGI server (default port `7667`) and the websocket server
(default port `7668`). You can change these ports by setting additional
variables `cs_wsgi_server_port` and `cs_checker_server_port`, respectively, in
your `config.py`.

@@ -109,7 +109,7 @@ server {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_cache_bypass $http_upgrade;
proxy_pass http://localhost:6010/;
proxy_pass http://localhost:7667/;
}

# the following will route websocket requests to
@@ -122,7 +122,7 @@ server {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_cache_bypass $http_upgrade;
proxy_pass http://localhost:6011/;
proxy_pass http://localhost:7668/;
}
}
```
@@ -130,7 +130,7 @@ server {
<div class="callout callout-warning">
<h4>Double Check</h4>
<p>Note that your <code>cs_url_root</code> and <code>cs_checker_websocket</code> should match the nginx configuration. In the example above, we should have <code>cs_url_root = 'https://your.server.com/cat-soop'</code> and <code>cs_checker_websocket = wss://your.server.com/reporter</code> in the <code>config.py</code> file.</p> <p>
Also, make sure the ports (<code>6010</code> and <code>6011</code> in the example above) match the port numbers you set in <code>config.py</code>, if any.
Also, make sure the ports (<code>7667</code> and <code>7668</code> in the example above) match the port numbers you set in <code>config.py</code>, if any.
</p>
</div>



Loading…
Cancel
Save