diff --git a/.github/workflows/fly.yml b/.github/workflows/fly.yml new file mode 100644 index 00000000..c3efe9b6 --- /dev/null +++ b/.github/workflows/fly.yml @@ -0,0 +1,27 @@ +name: Fly Deploy +on: + push: + branches: + - main + - staging +jobs: + prod-deploy: + if: github.ref == 'refs/heads/main' + name: Deploy Production App + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: superfly/flyctl-actions/setup-flyctl@master + - run: flyctl deploy -c fly.toml --app honcho --remote-only + env: + FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} + staging-deploy: + if: github.ref == 'refs/heads/staging' + name: Deploy Staging App + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: superfly/flyctl-actions/setup-flyctl@master + - run: flyctl deploy -c fly.toml --app staging-honcho --remote-only + env: + FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} diff --git a/chain.py b/chain.py index 728c9e05..375dd20a 100644 --- a/chain.py +++ b/chain.py @@ -301,7 +301,7 @@ class BloomChain: print("Finished User Prediction") print("=========================================") finally: - yield "TERMINATED SEQUENCE" + yield "❀" diff --git a/fly.toml b/fly.toml index 3239dd6d..d36e890b 100644 --- a/fly.toml +++ b/fly.toml @@ -18,7 +18,7 @@ api = "python -m uvicorn main:app --host 0.0.0.0 --port 8000" internal_port = 8000 auto_stop_machines = true auto_start_machines = true - min_machines_running = 0 + min_machines_running = 1 processes = ["api"] [http_service.concurrency] type = "requests"