https://github.com/nbw/phoenix-multi-database-example
Using Fly.io to host a Phoenix web app that's connected to multiple Postgres read-replica databases (1 read/write master and a number of read-only replicas).
https://github.com/nbw/phoenix-multi-database-example
elixir flyio
Last synced: 6 months ago
JSON representation
Using Fly.io to host a Phoenix web app that's connected to multiple Postgres read-replica databases (1 read/write master and a number of read-only replicas).
- Host: GitHub
- URL: https://github.com/nbw/phoenix-multi-database-example
- Owner: nbw
- Created: 2021-09-26T13:02:23.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-09-26T14:52:21.000Z (about 4 years ago)
- Last Synced: 2025-02-05T21:59:03.974Z (8 months ago)
- Topics: elixir, flyio
- Language: Elixir
- Homepage: https://nathanwillson.com/blog/posts/2021-09-25-fly-multi-db/
- Size: 125 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Fly multi-region-databases Phoenix/Elixir Example
Using Fly.io to host a Phoenix web app that’s connected to multiple Postgres read-replica databases (1 read/write master and a number of read-only replicas).
Check out [this blog post](https://nathanwillson.com/blog/posts/2021-09-25-fly-multi-db/) for a detailed explanation.
## Usage
From the `my_app` folder:
```
flyctl launch
```Note: the above command will create an app and fail the first time. To fix it:
* create a database (refer to blog post)
* set a base secret (refer to fly elixir setup docs)