-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Add --db-image
argument to wasp deploy railway
#3184
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
Changes from 8 commits
00b0ad6
717acb5
7a84c2a
f5c05cf
45862be
c276d57
dee1cbc
984c58a
0d82d87
3c76921
7798922
8c9c0dd
4217d57
97ad6e9
5f66ed4
91b92db
3d67589
12a0177
09b1f8e
7d91499
143d365
f23dfab
aeca0f1
c130a77
f38591d
c682352
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,10 @@ | |
|
||
## Unreleased | ||
|
||
### 🔧 Small improvements | ||
|
||
- You can now specify which PostgreSQL image to use in `wasp deploy railway` with the `--db-image` argument. ([#3184](https://github.com/wasp-lang/wasp/pull/3184)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Again, I'd list this as a feature :) Btw, please bump the version in waspc.cabal to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I will wait until we decided on the postmortem There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we decided we want to bump right away, does this make this comment actionable now? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I did it on here since I don't want to mix concerns in the same PR, we can merge that one first |
||
|
||
### 📖 Documentation | ||
|
||
- Added note for SMTP ports being blocked by some hosting providers (by @Vickram-T-G). ([#3109](https://github.com/wasp-lang/wasp/pull/3109)) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -122,14 +122,42 @@ async function setupRailwayProjectForDirectory({ | |
|
||
async function setupDb({ | ||
cmdOptions: options, | ||
dbServiceName, | ||
}: DeploymentInstructions<SetupCmdOptions>): Promise<void> { | ||
waspSays("Setting up database"); | ||
|
||
const railwayCli = createCommandWithCwd( | ||
options.railwayExe, | ||
options.waspProjectDir, | ||
); | ||
await railwayCli(["add", "-d", "postgres"]); | ||
|
||
if (options.dbImage) { | ||
waspSays(`Using custom database image: ${options.dbImage}`); | ||
// When using a custom database image, the automatic variables that Railway sets up for the | ||
// default Postgres template are not available. | ||
FranjoMindek marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
await railwayCli([ | ||
"add", | ||
"--service", | ||
dbServiceName, | ||
"--image", | ||
options.dbImage, | ||
infomiho marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
"--variables", | ||
"POSTGRES_DB=railway", | ||
"--variables", | ||
"POSTGRES_USER=postgres", | ||
"--variables", | ||
"POSTGRES_PASSWORD=${{secret()}}", | ||
"--variables", | ||
"PORT=5432", | ||
"--variables", | ||
"PGDATA=/var/lib/postgresql/data/pgdata", | ||
"--variables", | ||
"DATABASE_URL=postgresql://${{POSTGRES_USER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:${{PORT}}/${{POSTGRES_DB}}", | ||
|
||
]); | ||
} else { | ||
// Use the default Railway Postgres template | ||
cprecioso marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
await railwayCli(["add", "-d", "postgres"]); | ||
} | ||
} | ||
|
||
async function setupServer({ | ||
|
Uh oh!
There was an error while loading. Please reload this page.