R
Railway3y ago
Acel

Django deploy with nixpacks

When I try to deplot with nixpacks, it always tries to install psycopg2 despite it not being in my requirements.txt file. I have also tried installing it before building using nixpacks.toml with "[phases.setup] aptPkgs = ['psycopg2']" but that didn't work either Funny enough, my deployment runs perfectly fine when I change the builder to Heroku buildpacks.
5 Replies
Acel
AcelOP3y ago
still no respone? sighs
nebula
nebula3y ago
cc @salvage take a look at nixpacks django ig im too lazy to
jr
jr3y ago
Can you try installing postgres into the image
[phases.setup]
nixPkgs = ["...", "postgresql"]
[phases.setup]
nixPkgs = ["...", "postgresql"]
Also, is your repo open source? We would like to make this work out of the box
jr
jr3y ago
Confirmed that installing postgresql with Nix solves the problem. This should be fixed my default soon https://github.com/railwayapp/nixpacks/pull/597
GitHub
Python psycopg2 and postgres by coffee-cup · Pull Request #597 · ra...
This PR installs the postgresql Nix package if the python psycopg2 dependency is detected
Acel
AcelOP3y ago
This worked for me. thanks do nixPkgs also install packages available to apt? or how can I get a list of available nix packages? nah, it isn't
Want results from more Discord servers?
Add your server