2 years ago
Description: The most powerful backend engine for web3 apps.
Category: Other
27 Replies
2 years ago
Hey, just a few suggestions, instead of asking the user to use openssl to generate the keys, simply use ${{secret(64)}} to generate a random 64 length string.
https://docs.railway.app/guides/create#template-variable-functions
2 years ago
Hello there, is there any way we can modify this template? I'm Waren from the thirdweb team. Maybe I can help improve this template.
2 years ago
Hi Waren, users can't modify other users templates without duplicating and republishing them, and we really try to stay away from duplicate templates as it causes confusion and significantly lowers the DX. With that said, I would still like to know what you would change or improve about this template?
2 years ago
@brody thanks for that. I will update the template
@warengonzaga, what would you like to improve?
2 years ago
I love to see the community working together, I hope you two can work together to create the best template for this possible!
let me know if you have any questions!
2 years ago
Hi, this template doesn't seem to work anymore. Is there some special config that you need to do. Based off 17% success on recent deploys I assume I'm not the only one. Thanks for the patience this is my first time using railway
2 years ago
That's a terrible first impression, so sorry about that.
17% would be a near guarantee of total deploy failure, would you mind sharing any error logs?
2 years ago
Hello @thevolcanomanishere, would like to improve the readme of your template how I can check your template's code? I'm willing to help improve this template. How can I contact you?
Is it possible to create another template similar to this?
2 years ago
At 17% success rate for this template, you are welcome to publish a new template as it doesn't seem like the original creator has any interest in keeping this template healthy.
2 years ago
Got it thanks brody!
I'm part of the team at thirdweb and we wanna make sure that our end users can deploy the engine without any issues using your platform. If the creator is willing to keep it healthy we can keep this template.
2 years ago
As long as you know the Railway platform well enough to create a great template you absolutely should given the current 17% rate of this template.
2 years ago
Hey brody, it looks like it has something to do with the db
PrismaClientInitializationError:
Invalid `prisma.$queryRaw()` invocation:
Can't reach database server at `postgres.railway.internal`:`5432`
Please make sure your database server is running at `postgres.railway.internal`:`5432`.
at vn.handleRequestError (/app/node_modules/@prisma/client/runtime/library.js:123:7003)
at vn.handleAndLogRequestError (/app/node_modules/@prisma/client/runtime/library.js:123:6119)
at vn.request (/app/node_modules/@prisma/client/runtime/library.js:123:5839)
at async l (/app/node_modules/@prisma/client/runtime/library.js:128:9763)
at async main (file:///app/dist/scripts/setup-db.js:4:43) {
clientVersion: '5.2.0',
errorCode: undefined
}
Node.js v18.19.1
error Command failed with exit code 1.That being said the db deploys fine and from what I can see postgres.railway.internal looks like the proper syntax.
2 years ago
Just to get you up and running, can you try setting the POSTGRES_CONNECTION_URL service variable in the thirdweb-engine service to ${{Postgres.DATABASE_PRIVATE_URL}}?connect_timeout=30
2 years ago
unfortunately the same issue but thanks for the tip would have made sense to me
2 years ago
Deploy logs. This is the build logs
```Publish time: 1.46 seconds
====================
Starting Healthcheck
====================
Path: /system/health
Retry window: 5m0s
Attempt #1 failed with service unavailable. Continuing to retry for 4m59s
Attempt #2 failed with service unavailable. Continuing to retry for 4m58s
Attempt #3 failed with service unavailable. Continuing to retry for 4m56s
Attempt #4 failed with service unavailable. Continuing to retry for 4m52s
Attempt #5 failed with service unavailable. Continuing to retry for 4m44s
Attempt #6 failed with service unavailable. Continuing to retry for 4m28s
Attempt #7 failed with service unavailable. Continuing to retry for 3m58s
Attempt #8 failed with service unavailable. Continuing to retry for 3m58s
Attempt #9 failed with service unavailable. Continuing to retry for 3m28s
Attempt #10 failed with service unavailable. Continuing to retry for 2m58s
Attempt #11 failed with service unavailable. Continuing to retry for 2m28s
Attempt #12 failed with service unavailable. Continuing to retry for 1m58s
Attempt #13 failed with service unavailable. Continuing to retry for 1m28s
Attempt #14 failed with service unavailable. Continuing to retry for 58s
Attempt #15 failed with service unavailable. Continuing to retry for 28s
1/1 replicas never became healthy!
Healthcheck failed!```
2 years ago
Hey @thehomelesscoder can you try this instead? ?connection_limit=10 for the POSTGRES_CONNECTION_URL
2 years ago
Yeah I actually tried that already because that was in the docs on the thirdweb site
2 years ago
This issue is due to the delay in the private network availability at the first start-
https://docs.railway.app/guides/private-networking#initialization-time
I was hoping that increasing the connection timeout would work for you as it has for others.
warengonzaga, would you be interested in adding some kind of retry loop for the database connection? as opposed to a hard 3-second sleep as the docs recommend.
2 years ago
Hello Brody,
I shared this with the engineering team at thirdweb let me get back to you with updates.
2 years ago
I can't believe I completely overlooked this, thirdweb deploys with a Dockerfile based on Alpine, thus ENABLE_ALPINE_PRIVATE_NETWORKING=true is needed to be added to the thirdweb service variables, with this alone the template deploys without issues.
2 years ago
So cancel that request to add a retry loop, sorry for the confusion, it seems like primsa's default 5-second connection timeout is sufficient as long as you have that variable set.
2 years ago
No worries Brody, I'm currently building a new template with an updated setup.
Status changed to Solved Railway • almost 2 years ago
2 years ago
Thanks for being so responsive, this was super helpful thanks so much