I ended up hitting some snags getting this running so I thought I would write down what worked for me to get postgis working.
One note: if you go with the default VM size of shared-cpu-1x - 256
, running CREATE EXTENSION postgis
causes the db to run out of memory and you see this as a network disconnect. I spent ages thinking the issue was something more sinister!
flyctl postgres create
- if you’re using
shared-cpu-1x - 256
, bump the memory:flyctl scale memory 1024
- Clone the postgres-ha repo
- Edit the toml.yaml file to use your app name
- Modify the Dockerfile to add postgis extensions (example Dockerfile)
- Run
flyctl deploy