From 2ff030f1a00121e256e233674b42453df55269dc Mon Sep 17 00:00:00 2001 From: Pratik Borole Date: Wed, 10 Jan 2024 21:15:18 +0530 Subject: [PATCH] updated app port to 8081 for avoiding collision with frontend-cypress --- Dockerfile.dev | 8 ++++---- README.md | 10 +++++----- run.py | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Dockerfile.dev b/Dockerfile.dev index f6f827a..1a8c66a 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -18,14 +18,14 @@ RUN pip install --no-cache-dir poetry RUN poetry config virtualenvs.create false \ && poetry install --no-interaction --no-ansi --no-root -# Make port 8080 available to the world outside this container -EXPOSE 8080 +# Make port 8081 available to the world outside this container +EXPOSE 8081 # Healthcheck HEALTHCHECK --interval=5m --timeout=3s \ CMD curl -f http://localhost/health || exit 1 # Run the uvicorn command, telling it to use the app object imported from app.main. -CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8080", "--reload"] +CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8081", "--reload"] -# CMD ["uvicorn", "app.main:app", "--proxy-headers", "--host", "0.0.0.0", "--port", "8080" "--reload"] \ No newline at end of file +# CMD ["uvicorn", "app.main:app", "--proxy-headers", "--host", "0.0.0.0", "--port", "8081" "--reload"] \ No newline at end of file diff --git a/README.md b/README.md index a86fc35..a4d7994 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ poetry install --no-root - Execute the `/Scripts/Activate` script from the virtual environment located [here](https://python-poetry.org/docs/configuration/#cache-directory) - Run `python run.py` to start the server. -- Open your browser at `http://127.0.0.1/8080`. +- Open your browser at `http://127.0.0.1/8081`. ### Docker @@ -62,15 +62,15 @@ poetry install --no-root **Note**: The first build will take about 10 minutes. Please be patient. Subsequent builds should be quicker (given that the image has not been prunes). - Run container ```sh - docker run --detach --name backend-dev-container --publish 8080:8080 backend-dev + docker run --detach --name backend-dev-container --publish 8081:8081 backend-dev ``` -- Open your browser at http://127.0.0.1/8080. +- Open your browser at http://127.0.0.1/8081. - For other docker commands, see [useful_commands.md](./useful_commands.md) ### Interactive API docs -- Once the server is running, open your browser at `http://127.0.0.1:8080/docs`. -- Alternate docs can be found at `http://127.0.0.1:8080/redoc`, provided by [redoc](https://github.com/Redocly/redoc). +- Once the server is running, open your browser at `http://127.0.0.1:8081/docs`. +- Alternate docs can be found at `http://127.0.0.1:8081/redoc`, provided by [redoc](https://github.com/Redocly/redoc). ### Interactive Jupyter notebook diff --git a/run.py b/run.py index 34ebf5f..e9035c2 100644 --- a/run.py +++ b/run.py @@ -3,7 +3,7 @@ def start_server(): uvicorn.run( - "app.main:app", host="127.0.0.1", port=8080, reload=True, log_level="info" + "app.main:app", host="127.0.0.1", port=8081, reload=True, log_level="info" )