How do I include a provider for a pre-deploy command

When I built my project with nixpacks I could add different providers so I added python because my pre-deploy command depends on it, after some complications with my deployment I moved to a Dockerfile and the providers option isn't available anymore in the service settings.

Any guidance on this?

70 Replies

61e8a6cb-cf14-46b3-b9c7-02bd72e95922


a year ago

You would need to have your Dockerfile install python


<:salute:1137099685417451530>


It's a multi-stage build, does it matter where I install python?


a year ago

the final stage




a year ago

huh, you are using bun, doesnt bun have native support for sqlite??


the auth package uses better-sqlite


and it isn't even supposed to use sqlite, it is doing weird thingys


a year ago

oof


If I add the ?family=0 to the ioredis connect it instead of ENOTFOUND throws a TIMEDOUT


it fails to connect to redis in the pre-deploy command


it needs the auth.ts file on the pre-deploy command, I wonder if it copies it over since pre-deploys are ran in an isolated container


what I'm guessing is that it doesn't find the auth.ts -> doesn't know it uses postgres instead of sqlite -> does these weird thingys and fail


a year ago

pre-deploy commands are ran in their own container, but it is the same container that will be ran for runtime, same variables, same file system, etc


im going back to dockerfile


(I was trying railpack and nixpacks again)


😢

1349559331787640800


a year ago

lol


do you know if it's possible to include make as an apt package in railpacks?


https://railpack.com/config/file#root-configuration

I tried adding build-essentials and make to buildAptPackages with no success.


a year ago

do you need make during build or during deploy?


the pre deploy commands needs python because it uses node-gyp to do some things, node gyp invokes the make command


a year ago

DEPLOY_APT_PACKAGES=make


amazing


gyp ERR! stack Error: not found: make


also tried build-essential


as stated by the logs, the commands build-essential, make and nodejs were installed



a year ago

ssh and check


the container is dead


a year ago

sleep infinite



a year ago

sadge


yeah


a year ago

install it again and see what happens


a year ago

within ssh


ok



a year ago

update needed?


yep


a year ago

does railpack not do an update automatically?


according to the build logs, no.


a year ago

so now you have make installed?


yes


a year ago

well thats interesting


indeed


well, if u have any other suggestions… dockerfile didn't work, nixpacks didn't work next thing i'm gonna do is throw this project into the trash can


a year ago

why didnt the dockerfile work?


redis refused to work


ioredis and the normal redis client


tried as a pre deploy command and as a command in the dockerfile before running the app


even with the ?family=0 with ioredis, just extremely weird behavior


a year ago

is redis in the same env?


yes


i'll try to get some logs one sec


there's no option to download it lol, this is the deployment id 234b321a-96bd-4ee6-b426-906edd0363f9


pg pool connects but redis doesn't

1349576247352496000


it keeps trying for a while then crashes


this is the first command it runs bunx @better-auth/cli generate --y


generates the schemas to apply to the db and redis for session storage


gonna go to sleep, do you think this is worth opening an issue in the railpacks repo?


a year ago

drop something in <#1347035681305923634> - hopefully something that can reproduce the issue you had with make not being available


one question since im still trying to figure out this issue


the container that the pre-deploy commands run has the same dir structure as the main container?


a year ago

yes, it is most literally the same image ran


I FIXED IT!
it was an issue with bun, changing the command to npx fixed it


should've tried that sooner, thanks for the (emotional) support @Brody


a year ago

so running with node fixed it?


Loading...