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
Project ID:
d7c966b3-07dd-4a31-9cb9-82de5002e54f
You might find these helpful:
- Running database migrations before each deployment (and AFTER build steps)
β οΈ experimental feature
d7c966b3-07dd-4a31-9cb9-82de5002e54f
are you using nixpacks
Docker
I can't seem to get nixpacks to work with my project
oh?
any logs? would love to help u figure this out
Yeah I can repro and show you, give me a few π
cool
Builds are timing out, not sure if I'll be able to show you right now
Got it
My nixpacks.toml is only
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
do you need to install a postgresql binary? or
that's a bug
Yeah for diesel
oh shit, not diesel π
we don't support diesel. @Finn - uses centos tried to implement it but apparently it was very annoying
Ahh
did u get anywhere with implementing diesel finn
I mean, I can use diesel fine at runtime
I just want to be able to do a
diesel migration run
on PR deployconfig as code might help you
for that
ac nvm
Yep however I can't get the nix build to work
Would you recommend sqlx instead or ?
oh yeah fuck that
i think so.
prisma client rust is also nice. but thats an orm.
pcr is amazing
yeah, also good
diesel is a bit of a burden in these days
plus: we support pcr & sqlx very nicely
Wait prisma is on rust?
I haven't heard of pcr
you can use diesel via a dockerfile quite easily
it's unofficial
but as we say its slow and not great
I see
So between sqlx and prisma, which would be the easier to maintain long term?
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 )
It doesn't seem to be, no
no
sql client
nah pcr is stable
prisma 100%
it is, its just a orm becomes a pain point once your project gets bigger
prisma client is amazing
now time to make nixpacks images smaller!!!!
Thank you both π
I think I'll go with prisma until it gets hard
no problem!
roger.
one too many gs chief
and prisma migrate is amazing i think i would use it at most scales until i need an ost
oh no neb now that he has power is going to attack us
for what
dunno
hes gonna tell me how cool i am
whatβs wrong here
just wait
Nothing, that's just the content
diesel orm
Incase I got that wrong
rust
not worky with nixpacks
trust me its not worth solving, jr, cooper and me have all failed to get it working
let me get the nix gods on the nix forum to fix it!!
diesel is just L software ngl
acc that's not even a half bad idea
it needs some fucky linking with rust
nvm
not doing that
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...
anyway i'll lclose this]