Skip to content

Commit 032ebb6

Browse files
committed
Issue 497: Change default port to 5001.
1 parent 8feade2 commit 032ebb6

File tree

11 files changed

+36
-36
lines changed

11 files changed

+36
-36
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ jobs:
9494
# Verify with utils script back in the workspace
9595
# (verify.py is not included in flit install)
9696
pushd ${{ github.workspace }}
97-
python -m utils.verify 5000
97+
python -m utils.verify 5001
9898
popd
9999
100100
pkill -f "python -m lute.main" # Kill that process.
@@ -257,9 +257,9 @@ jobs:
257257
run: |
258258
docker build -f docker/Dockerfile --build-arg INSTALL_EVERYTHING=false -t lute3 .
259259
# Run container in the background, and check.
260-
docker run -d -p 5000:5000 -v ./my_data:/lute_data -v ./my_backups:/lute_backup --name my-lute lute3:latest
260+
docker run -d -p 5001:5001 -v ./my_data:/lute_data -v ./my_backups:/lute_backup --name my-lute lute3:latest
261261
sleep 10 # Give it a moment to start.
262-
python -m utils.verify 5000
262+
python -m utils.verify 5001
263263
docker stop my-lute
264264
docker rm my-lute
265265
@@ -350,4 +350,4 @@ jobs:
350350
- name: Verify flit install
351351
run: |
352352
cd ${{ github.workspace }}
353-
python -m utils.verify 5000
353+
python -m utils.verify 5001

README_PyPi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ pip install lute3
3232
# Start lute
3333
python -m lute.main
3434
35-
# Open your web browser to http://localhost:5000
35+
# Open your web browser to http://localhost:5001
3636
# When done, hit Ctl-C
3737
3838
# Stop the virtual environment.

devstart.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def dev_print(s):
5757
if __name__ == "__main__":
5858
parser = argparse.ArgumentParser(description="Start dev server lute.")
5959
parser.add_argument(
60-
"--port", type=int, default=5000, help="Port number (default: 5000)"
60+
"--port", type=int, default=5001, help="Port number (default: 5001)"
6161
)
6262
args = parser.parse_args()
6363
start(args.port)

docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ RUN chmod +x /lute/install_all.sh
2323

2424
RUN if [ "$INSTALL_EVERYTHING" = "true" ]; then /lute/install_all.sh; fi
2525

26-
EXPOSE 5000
26+
EXPOSE 5001
2727

2828
# Start script.
2929
COPY docker/Dockerfile_scripts/start.sh /lute/start.sh

docker/docker-compose.yml.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ services:
55
lute:
66
image: lute3:latest
77
ports:
8-
- 5000:5000
8+
- 5001:5001
99
volumes:
1010
# Note: you should change these directories
1111
# to absolute paths (e.g. "/usr/yourname/etc/my_data")

docker/docker_hub_overview.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ For more information, see the [Lute manual](https://luteorg.github.io/lute-manua
1111
# How to use this image
1212

1313
```
14-
docker run -p 5000:5000 -v <MY_DATA_PATH>:/lute_data -v <MY_BACKUP_PATH>:/lute_backup jzohrab/lute3:latest
14+
docker run -p 5001:5001 -v <MY_DATA_PATH>:/lute_data -v <MY_BACKUP_PATH>:/lute_backup jzohrab/lute3:latest
1515
```
1616

1717
Docker containers using this image writes to container directories which must be mounted from the host:
@@ -26,13 +26,13 @@ Example:
2626
```
2727
mkdir -p ~/lute/data
2828
mkdir -p ~/lute/backups
29-
docker run -p 5000:5000 -v ~/lute/data:/lute_data -v ~/lute/backups:/lute_backup --name my-lute jzohrab/lute3:latest
29+
docker run -p 5001:5001 -v ~/lute/data:/lute_data -v ~/lute/backups:/lute_backup --name my-lute jzohrab/lute3:latest
3030
```
3131

3232
The above:
3333

3434
* runs the container from the `jzohrab/lute3:latest` image
35-
* exposes port 5000 on the host (so http://localhost:5000 works)
35+
* exposes port 5001 on the host (so http://localhost:5001 works)
3636
* mounts the necessary directories
3737
* names the running container "my-lute"
3838

@@ -48,15 +48,15 @@ and it prints:
4848
4949
Running at:
5050
51-
http://localhost:5000
51+
http://localhost:5001
5252
5353
5454
When you're finished reading, stop this container
5555
with Ctrl-C, docker compose stop, or docker stop <containerid>
5656
as appropriate.
5757
```
5858

59-
(You can now open your browser to `http://localhost:5000` and start working through the Lute demo.)
59+
(You can now open your browser to `http://localhost:5001` and start working through the Lute demo.)
6060

6161
With the above command, the `lutev3` process takes over that console window, so start a new console window and enter
6262

@@ -81,7 +81,7 @@ services:
8181
lute:
8282
image: jzohrab/lute3:latest
8383
ports:
84-
- 5000:5000
84+
- 5001:5001
8585
volumes:
8686
- ~/lute/data:/lute_data
8787
- ./lute/backups:/lute_backup

lute/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
22
User entry point.
33
4-
Start lute running on given port, or 5000 if not set.
4+
Start lute running on given port, or 5001 if not set.
55
66
e.g.
77
@@ -117,7 +117,7 @@ def start():
117117
"Main entry point. Called via scripts and pyproject.toml."
118118
parser = argparse.ArgumentParser(description="Start lute.")
119119
parser.add_argument(
120-
"--port", type=int, default=5000, help="Port number (default: 5000)"
120+
"--port", type=int, default=5001, help="Port number (default: 5001)"
121121
)
122122
parser.add_argument(
123123
"--config",

tasks.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ def todos(c):
4040
c.run("python utils/todos.py")
4141

4242

43-
@task(help={"port": "optional port to run on; default = 5000"})
44-
def start(c, port=5000):
43+
@task(help={"port": "optional port to run on; default = 5001"})
44+
def start(c, port=5001):
4545
"""
4646
Start the dev server, using script dev.py.
4747
"""
@@ -83,10 +83,10 @@ def test(c):
8383

8484
def _site_is_running(useport=None):
8585
"""
86-
Return true if site is running on port, or default 5000.
86+
Return true if site is running on port, or default 5001.
8787
"""
8888
if useport is None:
89-
useport = 5000
89+
useport = 5001
9090

9191
url = f"http://localhost:{useport}"
9292
try:
@@ -116,7 +116,7 @@ def _site_is_running(useport=None):
116116
)
117117
def accept( # pylint: disable=too-many-arguments
118118
c,
119-
port=5000,
119+
port=5001,
120120
show=False,
121121
noheadless=False,
122122
kflag=None,
@@ -126,7 +126,7 @@ def accept( # pylint: disable=too-many-arguments
126126
"""
127127
Start lute, run tests/acceptance tests, screenshot fails.
128128
129-
If no port specified, use default 5000.
129+
If no port specified, use default 5001.
130130
131131
If Lute's not running on specified port, start a server.
132132
"""
@@ -174,14 +174,14 @@ def playwright(c):
174174
"""
175175
Start lute, run playwright tests. export SHOW=true env var to run non-headless.
176176
177-
Only uses port 5000.
177+
Only uses port 5001.
178178
179179
If Lute's not running on specified port, start a server.
180180
"""
181181
run_test = ["pytest", "tests/playwright/playwright.py", "-s"]
182182

183183
tests_failed = False
184-
port = 5000
184+
port = 5001
185185
if _site_is_running(port):
186186
c.run(" ".join(run_test))
187187
else:

tests/acceptance/book.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Feature: Books and stats are available
3636

3737
Scenario: I can import a url.
3838
Given I visit "/"
39-
Given a Spanish book from url http://localhost:5000/dev_api/fake_story.html
39+
Given a Spanish book from url http://localhost:5001/dev_api/fake_story.html
4040
Then the page title is Reading "Mi perro."
4141
And the reading pane shows:
4242
Hola/. /Tengo/ /un/ /perro/.

tests/acceptance/lute_test_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ def elapsed(self, step):
352352
353353
To see this data, run the acc. tests with '-s', eg:
354354
355-
pytest tests/acceptance/test_smoke.py --port=5000 -s
355+
pytest tests/acceptance/test_smoke.py --port=5001 -s
356356
"""
357357
now = time.perf_counter()
358358
since_start = now - self.start

0 commit comments

Comments
 (0)