From 1bcc5705f1b745c1079e6dbd55cea471d506189b Mon Sep 17 00:00:00 2001 From: Vincent Billey Date: Mon, 29 May 2023 11:08:53 +0200 Subject: [PATCH] Reduce the number of instances of a PG cluster (#17) Since Fly has difficulties provisioning cluster for the moment, we will reduce it for the time being. --- README.md | 12 ++++++------ entrypoint.sh | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index e26fb83..addcdb8 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ jobs: - name: Deploy id: deploy - uses: fewlinesco/fly-io-review-apps@v3.5 + uses: fewlinesco/fly-io-review-apps@v3.6 ``` ## Cleaning up GitHub environments @@ -86,7 +86,7 @@ jobs: - name: Deploy app id: deploy - uses: fewlinesco/fly-io-review-apps@v3.5 + uses: fewlinesco/fly-io-review-apps@v3.6 - name: Clean up GitHub environment uses: strumwolf/delete-deployment-environment@v2 @@ -111,7 +111,7 @@ steps: - name: Deploy app id: deploy - uses: fewlinesco/fly-io-review-apps@v3.5 + uses: fewlinesco/fly-io-review-apps@v3.6 with: postgres: true ``` @@ -125,7 +125,7 @@ steps: - name: Deploy app id: deploy - uses: fewlinesco/fly-io-review-apps@v3.5 + uses: fewlinesco/fly-io-review-apps@v3.6 with: postgres: true region: cdg @@ -146,7 +146,7 @@ steps: - uses: actions/checkout@v3 - name: Deploy redis - uses: fewlinesco/fly-io-review-apps@v3.5 + uses: fewlinesco/fly-io-review-apps@v3.6 with: update: false # Don't need to re-deploy redis when the PR is updated path: redis # Keep fly.toml in a subdirectory to avoid confusing flyctl @@ -155,7 +155,7 @@ steps: - name: Deploy app id: deploy - uses: fewlinesco/ffly-io-review-apps@v3.5 + uses: fewlinesco/ffly-io-review-apps@v3.6 with: name: pr-${{ github.event.number }}-myapp-app ``` diff --git a/entrypoint.sh b/entrypoint.sh index cb48f29..9f7140a 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -48,7 +48,7 @@ if ! flyctl status --app "$app"; then # if PostgreSQL is requested, create a PostgreSQL App then Deploy Application if [ -n "$INPUT_POSTGRES" ]; then if ! flyctl status --app "$postgres_app"; then - flyctl postgres create --name "$postgres_app" --region "$region" --org "$org" --vm-size "$postgres_vm_size" --volume-size 1 --initial-cluster-size 2 + flyctl postgres create --name "$postgres_app" --region "$region" --org "$org" --vm-size "$postgres_vm_size" --volume-size 1 --initial-cluster-size 1 # Create additional PostgreSQL read replicas if [ -n "$INPUT_POSTGRES_CLUSTER_REGIONS" ]; then pg_machine_id=$(flyctl machine list -a $postgres_app --json | jq --raw-output '.[0].id')