Skip to content

Commit

Permalink
fix: modify default port (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
laurasgkadri98 authored Aug 19, 2024
1 parent ec6492f commit fb62984
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 37 deletions.
33 changes: 0 additions & 33 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
4 changes: 2 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
CMD ["sh", "-c", "allie-flowkit-python --host 0.0.0.0 --port 50052 --workers $WORKERS"]
2 changes: 1 addition & 1 deletion src/allie/flowkit/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit fb62984

Please sign in to comment.