-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Add --db-image
argument to wasp deploy fly
#3187
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
base: main
Are you sure you want to change the base?
Conversation
Deploying wasp-docs-on-main with
|
Latest commit: |
b40b727
|
Status: | ✅ Deploy successful! |
Preview URL: | https://1d0cf46e.wasp-docs-on-main.pages.dev |
Branch Preview URL: | https://image-arg-for-deploy-fly.wasp-docs-on-main.pages.dev |
|
||
## Using a Custom PostgreSQL Image | ||
|
||
By default, Wasp uses the standard PostgreSQL image provided by Fly.io when creating a new database for your app. However, if your application requires specific PostgreSQL extensions (e.g., PostGIS), you can specify a custom PostgreSQL image during any of the commands that create a database. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only thing, I would try to standardize the text between here and railway
.
#3184
There will be changes, but e.g. start of the explanation could be the same:
By default standard version by {provider}.. if want different because of e.g. plugins ... specify yourself...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, but I didn't dig into "is this correctly wired in all the places", I just look at the code changes and commented.
If you want somebody to check the first thing, probably best to have @infomiho take a look, or if you are confident, we can just go with it.
) | ||
.option( | ||
"--db-image <dbImage>", | ||
"custom postgres image with extensions (must be based on flyio/postgres-flex)", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would make it clear it is Docker image.
Also, why "with extensions"? Does it need to have extensions, why would that be so?
|
||
If you want to build locally, supply the `--build-locally` option to `wasp deploy fly launch` or `wasp deploy fly deploy`. | ||
|
||
## Using a Custom PostgreSQL Image |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
## Using a Custom PostgreSQL Image | |
## Using a Custom PostgreSQL Docker Image |
I feel like we are not mentioning word Docker enough, we mostly just say image. That can be fine is context of Docker image is strongly established, but I don't think it is here, so I would at leats put it here in the title, to establish that context. ANd maybe I would even sprinkle Docker here and there below.
wasp deploy fly create-db <region> --db-image <custom-postgres-image> | ||
wasp deploy fly setup <app-name> <region> --db-image <custom-postgres-image> | ||
wasp deploy fly launch <app-name> <region> --db-image <custom-postgres |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this is me not knowing enough about how wasp deploy fly
works, but what is the idea here, I need to keep repeating this argument for every command? How often do I need to repeat it, what does the workflow look like? How cumbersome / impractical is that -> it looks pretty impractical? What if they forget to pass it, what happens? If this is a problem, is there a better solution?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about discoverability -> I am person building a Wasp app, and I used postgres extensions. Now I want to deploy to Fly. How likely am I to see this new piece of docs about custom docker image on Fly?
I guess I will look for it explicitly because I will know I need a custom Docker image, right? In that case I think we are fine.
But another thought. Wouldn't it be cool if Wasp knew you are using a custom docker image for development already, with extensions, and then when you are doing deployment, it prompted you also to provide a custom docker image? Or maybe even reused the same one you used for development? That might be interesting hm. Although I guess it can't be the same image because Fly has some config it expects from it. ALthough we could use that image locally, why not, based on Fly's image. Hm. So maybe optimal solution would be to have a place in Wasp where one can define databaes image, and then that same image is used by default both during development and also when deploying the database. This is also good because you normally want the development environment to be as similar to production environment as possible.
This certainly shouldn't be happening in this issue, but I thought it is a good moment to think about this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just like with Railway, There are plenty of reviewers here already so I won't take a detailed look unless you need me to.
I'll just say that this principle should also apply here:
bb623d0
to
80afb7b
Compare
Co-authored-by: Martin Šošić <[email protected]>
Adds an optional
--db-image
argument to thewasp deploy fly {launch,setup,create-db}
command, allowing the user to specify a custom Docker image for the database.This is part of #3174. We're adding
ask-the-documents
to the repo, which needs a specific PostgreSQL extension. This way we can more easily test the app.Note
🤖 Generated with Claude Code
and 👨🏻 reviewed and edited by a person