Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #17

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
# High Availability Postgres on Fly

This is a ready to go HA Postgres app that runs on Fly.
This is a ready-to-go HA Postgres app that runs on Fly.

## Prepare your app

### `flyctl init`
Init gets you going with a Fly application and generates a config file.

### Set secrets
This app requires `SU_PASSWORD` and `REPL_PASSWORD` environment variables.
This app requires `SU_PASSWORD` and `REPL_PASSWORD` environment variables and gives users the option to create a "root" account on new database clusters using 'OPERATOR_PASSWORD'.
Copy link
Contributor

@davissp14 davissp14 Aug 10, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's replace the single quotations with backtick's for consistency. E.G. OPERATOR_PASSWORD instead of 'OPERATOR_PASSWORD'.

and gives users the option to create a "root" account on new database clusters

We could maybe make this a bit more direct. Maybe something like:

This app requires SU_PASSWORD and REPL_PASSWORD environment variables. Optionally, you may specify the OPERATOR_PASSWORD to create an initial "postgres" user on provision.


`SU_PASSWORD` is the PostgreSQL super user password, the username is `flypgadmin`. You can use this to administer the database once it's running. You should create less privileged users for your applications to use.
`SU_PASSWORD` is the PostgreSQL super user password, and the username is `flypgadmin`. You can use this to administer the database once it's running. You should create less privileged users for your applications to use.

`REPL_PASSWORD` is used to replicate between instances.

'OPERATOR_PASSWORD' is used to create a "root" user when a cluster is initialized.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above, replace single quotes with backticks.


> `flyctl secrets set SU_PASSWORD=<PASSWORD> REPL_PASSWORD=<PASSWORD>`

## Deploy one instance
Expand All @@ -29,4 +31,4 @@ This app requires `SU_PASSWORD` and `REPL_PASSWORD` environment variables.
## Add a replica in another region

1. `flyctl volumes create pg_data --region syd --size 10`
2. `flyctl scale count 2`
2. `flyctl scale count 2`