R
Railwayβ€’2y ago
Shah

Post build script?

I'd like to be able to run db migrations for PR environments but I'm not sure how to have a script that runs after the build step but before the start step. Any guidance for this?
58 Replies
Percy
Percyβ€’2y ago
Project ID: d7c966b3-07dd-4a31-9cb9-82de5002e54f
Percy
Percyβ€’2y ago
⚠️ experimental feature
Shah
Shahβ€’2y ago
d7c966b3-07dd-4a31-9cb9-82de5002e54f
milo
miloβ€’2y ago
are you using nixpacks
Shah
Shahβ€’2y ago
Docker I can't seem to get nixpacks to work with my project
milo
miloβ€’2y ago
oh? any logs? would love to help u figure this out
Shah
Shahβ€’2y ago
Yeah I can repro and show you, give me a few πŸ™‚
milo
miloβ€’2y ago
cool
Shah
Shahβ€’2y ago
Builds are timing out, not sure if I'll be able to show you right now Got it
Shah
Shahβ€’2y ago
Shah
Shahβ€’2y ago
My nixpacks.toml is only
[phases.build]
nixPkgs = ["postgresql"]
[phases.build]
nixPkgs = ["postgresql"]
For additional context I'm building from a monorepo where my project is in the /backend directory, which "backend" also happens to be the service name Not sure if that does anything
milo
miloβ€’2y ago
do you need to install a postgresql binary? or that's a bug
Shah
Shahβ€’2y ago
Yeah for diesel
milo
miloβ€’2y ago
oh shit, not diesel πŸ˜” we don't support diesel. @Finn - uses centos tried to implement it but apparently it was very annoying
Shah
Shahβ€’2y ago
Ahh
milo
miloβ€’2y ago
did u get anywhere with implementing diesel finn
Shah
Shahβ€’2y ago
I mean, I can use diesel fine at runtime I just want to be able to do a diesel migration run on PR deploy
milo
miloβ€’2y ago
config as code might help you for that ac nvm
Shah
Shahβ€’2y ago
Yep however I can't get the nix build to work Would you recommend sqlx instead or ?
Finn
Finnβ€’2y ago
oh yeah fuck that i think so. prisma client rust is also nice. but thats an orm.
milo
miloβ€’2y ago
pcr is amazing yeah, also good diesel is a bit of a burden in these days plus: we support pcr & sqlx very nicely
Shah
Shahβ€’2y ago
Wait prisma is on rust? I haven't heard of pcr
Finn
Finnβ€’2y ago
you can use diesel via a dockerfile quite easily
milo
miloβ€’2y ago
it's unofficial
Finn
Finnβ€’2y ago
but as we say its slow and not great
Shah
Shahβ€’2y ago
I see So between sqlx and prisma, which would be the easier to maintain long term?
Finn
Finnβ€’2y ago
is sqlx a orm? for big things i would not use a prisma client. but for any side project of mine 100 prisma clinet ( i value my time )
Shah
Shahβ€’2y ago
It doesn't seem to be, no
milo
miloβ€’2y ago
no sql client nah pcr is stable prisma 100%
Finn
Finnβ€’2y ago
it is, its just a orm becomes a pain point once your project gets bigger prisma client is amazing
milo
miloβ€’2y ago
now time to make nixpacks images smaller!!!!
Shah
Shahβ€’2y ago
Thank you both πŸ™‚
Finn
Finnβ€’2y ago
skull1
Shah
Shahβ€’2y ago
I think I'll go with prisma until it gets hard
milo
miloβ€’2y ago
no problem!
Finn
Finnβ€’2y ago
roger.
Shah
Shahβ€’2y ago
peepoLove
milo
miloβ€’2y ago
one too many gs chief
Finn
Finnβ€’2y ago
and prisma migrate is amazing i think i would use it at most scales until i need an ost
milo
miloβ€’2y ago
oh no neb now that he has power is going to attack us
Finn
Finnβ€’2y ago
for what an
milo
miloβ€’2y ago
dunno
Finn
Finnβ€’2y ago
hes gonna tell me how cool i am
nebula
nebulaβ€’2y ago
what’s wrong here
Finn
Finnβ€’2y ago
just wait
Shah
Shahβ€’2y ago
Nothing, that's just the content
milo
miloβ€’2y ago
diesel orm
Shah
Shahβ€’2y ago
Incase I got that wrong
milo
miloβ€’2y ago
rust not worky with nixpacks
Finn
Finnβ€’2y ago
trust me its not worth solving, jr, cooper and me have all failed to get it working
milo
miloβ€’2y ago
let me get the nix gods on the nix forum to fix it!!
nebula
nebulaβ€’2y ago
diesel is just L software ngl
milo
miloβ€’2y ago
acc that's not even a half bad idea
Finn
Finnβ€’2y ago
it needs some fucky linking with rust
milo
miloβ€’2y ago
nvm not doing that
Finn
Finnβ€’2y ago
GitHub
Include libmysqlclient for Rust's Diesel ORM MySQL Builds Β· Issue #...
Feature request The automatic inclusion and linking of libmysqlclient when using diesel orm with mysql. Motivation Currently im using diesel with a mysql database, this requires me to have a versio...
Finn
Finnβ€’2y ago
skull1
milo
miloβ€’2y ago
anyway i'll lclose this]
Want results from more Discord servers?
Add your server