Skip to content

Commit

Permalink
Reduce the number of instances of a PG cluster (#17)
Browse files Browse the repository at this point in the history
Since Fly has difficulties provisioning cluster for the moment, we will
reduce it for the time being.
  • Loading branch information
Fenntasy committed May 29, 2023
1 parent 4e0a537 commit 1bcc570
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
```
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
```
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit 1bcc570

Please sign in to comment.