From fb629846e75712bc22977c2d2d8299e75a1175f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laura=20S=C3=A1nchez-Gallego=20Kadri?= <126669056+laurasgkadri98@users.noreply.github.com> Date: Mon, 19 Aug 2024 13:16:58 +0200 Subject: [PATCH] fix: modify default port (#15) --- .github/workflows/ci_cd.yml | 33 --------------------------------- README.md | 2 +- docker/Dockerfile | 4 ++-- src/allie/flowkit/__main__.py | 2 +- 4 files changed, 4 insertions(+), 37 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 2da4611..89fd581 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -191,36 +191,3 @@ jobs: platforms: linux/amd64,linux/arm64 tags: | ghcr.io/${{ github.repository }}:${{ github.ref_name }} - - main-repo-release: - name: Update main allie repo and create release - if: github.event_name == 'push' && contains(github.ref, 'refs/tags') - needs: [release-docker, release] - runs-on: ubuntu-latest - steps: - - name: Checkout allie repository - run: | - git clone --branch main https://${{ secrets.ALLIE_RELEASE_TOKEN }}@github.com/ansys-internal/allie.git - - - name: Setup Go - uses: actions/setup-go@v5 - with: - go-version-file: 'allie/scripts/releasehelper/go.mod' - - - name: Run tag script - run: | - cd allie/scripts/releasehelper - go run main.go "tag" ${{ github.ref_name }} ${{ secrets.ALLIE_RELEASE_TOKEN }} - - - name: Commit and push to allie - run: | - cd allie - git config --global user.email '${{ github.actor }}@users.noreply.github.com' - git config --global user.name '${{ github.actor }}' - git commit -a -m 'New release triggered by ${{ github.event.repository.name }}' - git push origin main - - - name: Run release script - run: | - cd allie/scripts/releasehelper - go run main.go "release" ${{ github.ref_name }} ${{ secrets.ALLIE_RELEASE_TOKEN }} diff --git a/README.md b/README.md index 34a6ab8..5f98f79 100644 --- a/README.md +++ b/README.md @@ -72,7 +72,7 @@ Allie FlowKit Python can be run locally or as a Docker container. Follow the ins ``` You can specify the host, port, and number of workers as needed. -2. The service will expose the functions as REST APIs on the specified port (default: 8000). +2. The service will expose the functions as REST APIs on the specified port (default: 50052). 3. Integrate these APIs into your Allie workflows as needed. diff --git a/docker/Dockerfile b/docker/Dockerfile index 86c48bc..808fbd7 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -14,10 +14,10 @@ COPY configs/config.yaml /app RUN echo $(ls) RUN pip install --no-cache-dir .[all] -EXPOSE 8000 +EXPOSE 50052 # Set default number of workers ENV WORKERS=4 # Use the environment variable in CMD -CMD ["sh", "-c", "allie-flowkit-python --host 0.0.0.0 --port 8000 --workers $WORKERS"] \ No newline at end of file +CMD ["sh", "-c", "allie-flowkit-python --host 0.0.0.0 --port 50052 --workers $WORKERS"] \ No newline at end of file diff --git a/src/allie/flowkit/__main__.py b/src/allie/flowkit/__main__.py index 66f5f9c..7819ff8 100644 --- a/src/allie/flowkit/__main__.py +++ b/src/allie/flowkit/__main__.py @@ -33,7 +33,7 @@ def main(): """Run entrypoint for the FlowKit service.""" parse = argparse.ArgumentParser() parse.add_argument("--host", type=str, default="0.0.0.0", help="The host to run the service on. By default 0.0.0.0") - parse.add_argument("--port", type=int, default=8000, help="The port to run the service on. By default 8000") + parse.add_argument("--port", type=int, default=50052, help="The port to run the service on. By default 50052") parse.add_argument("--workers", type=int, default=4, help="The number of workers to use. By default 4") args = parse.parse_args() uvicorn.run("allie.flowkit:flowkit_service", host=args.host, port=args.port, workers=args.workers)