diff --git a/Dockerfile b/Dockerfile index 2020a1748..020f73bf4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -58,7 +58,7 @@ LABEL org.hotosm.tasks.app-version="${APP_VERSION}" \ org.hotosm.tasks.python-img-tag="${PYTHON_IMG_TAG}" \ org.hotosm.tasks.dockerfile-version="${DOCKERFILE_VERSION}" \ org.hotosm.tasks.maintainer="${MAINTAINER}" \ - org.hotosm.tasks.api-port="5000" + org.hotosm.tasks.api-port="8000" # Fix timezone (do not change - see issue #3638) ENV TZ UTC # Add non-root user, permissions, init log dir @@ -147,7 +147,7 @@ RUN apt-get update && \ # Pre-compile packages to .pyc (init speed gains) RUN python -c "import compileall; compileall.compile_path(maxlevels=10, quiet=1)" RUN python -m compileall . -EXPOSE 5000/tcp +EXPOSE 8000/tcp USER appuser:appuser CMD ["gunicorn", "-c", "python:backend.gunicorn", "manage:application", \ "--workers", "1", "--log-level", "error"] diff --git a/backend/config.py b/backend/config.py index fe3b7ae40..6d6e136f1 100644 --- a/backend/config.py +++ b/backend/config.py @@ -16,7 +16,7 @@ class EnvironmentConfig: ) # The base url the application is reachable - APP_BASE_URL = os.getenv("TM_APP_BASE_URL", "http://127.0.0.1:5000/").rstrip("/") + APP_BASE_URL = os.getenv("TM_APP_BASE_URL", "http://127.0.0.1:8000/").rstrip("/") API_VERSION = os.getenv("TM_APP_API_VERSION", "v2") ORG_CODE = os.getenv("TM_ORG_CODE", "HOT") diff --git a/backend/services/mapping_service.py b/backend/services/mapping_service.py index ca8c1a47b..3fad98dff 100644 --- a/backend/services/mapping_service.py +++ b/backend/services/mapping_service.py @@ -224,7 +224,7 @@ def generate_gpx(project_id: int, task_ids_str: str, timestamp=None): """ Creates a GPX file for supplied tasks. Timestamp is for unit testing only. You can use the following URL to test locally: - http://www.openstreetmap.org/edit?editor=id&#map=11/31.50362930069913/34.628906243797054&comment=CHANGSET_COMMENT&gpx=http://localhost:5000/api/v2/projects/{project_id}/tasks/queries/gpx%3Ftasks=2 + http://www.openstreetmap.org/edit?editor=id&#map=11/31.50362930069913/34.628906243797054&comment=CHANGSET_COMMENT&gpx=http://localhost:8000/api/v2/projects/{project_id}/tasks/queries/gpx%3Ftasks=2 """ if timestamp is None: diff --git a/docs/developers/development-setup.md b/docs/developers/development-setup.md index 064a7597c..c0ec62575 100644 --- a/docs/developers/development-setup.md +++ b/docs/developers/development-setup.md @@ -140,7 +140,7 @@ docker compose up -d If you are looking to deploy only Frontend service with docker, You will need to make sure the following env vars are corrent in `tasking-manager.env` ``` -TM_APP_API_URL=http://127.0.0.1:5000 +TM_APP_API_URL=http://127.0.0.1:8000 ``` This refers to the backend service that you are going to consume, If you don't have a Tasking Manager backend instance you can use the staging server hosted by hotosm. ``` @@ -361,7 +361,7 @@ pdm run flask run --debug --reload ``` You can access the API documentation on -[http://localhost:5000/api-docs](http://localhost:5000/api-docs), it +[http://localhost:8000/api-docs](http://localhost:8000/api-docs), it also allows you to execute requests on your local TM instance. The API docs is also available on our [production](https://tasks.hotosm.org/api-docs) and diff --git a/docs/developers/submit-pr.md b/docs/developers/submit-pr.md index 15a4fb265..52b3212d1 100644 --- a/docs/developers/submit-pr.md +++ b/docs/developers/submit-pr.md @@ -37,7 +37,7 @@ production server. * Are changes made to the frontend? Walk through them logged in and logged out (if possible). * Are changes made to the API? Check you can poll it at - `http://localhost:5000/api-docs` if you have Tasking Manager running + `http://localhost:8000/api-docs` if you have Tasking Manager running in a docker container. * Do changes touch messaging? Try logging in with two separate accounts in two browsers (e.g. one open with private browsing) and