hi folks i m trying to deploy a site to
hi folks! i'm trying to deploy a site to cloudflare pages. it's built with node, but my root directory also has a requirements.txt file. how can i tell pages not to install python dependencies?
11 Replies
i would just ignore it, but installing python dependencies throws an error about
Django==4.1
not being available!do you need the requirements.txt?
yep. it's a django project, it just also serves a react frontend. i'm using pages to deploy our component UI browser (storybook).
or, i'd like to use pages for that, if i can get it to work
ok so you do need it to install python dependencies
Since Django is Python...
i don't need pages to install python dependencies, no!
the django stuff just happens to be in the repo. for the purposes of deploying this site, it's irrelevant
i'd just remove the file either in the repo or in the build command
rm requirements.txt
Wouldn't the install fire before the
rm
?yep, it does. just tried that!
ah yes of course
i can't remove requirements.txt; it's needed for my project
maybe this is more of a task for workers sites?
or, if pages supported python 3.8, this also wouldn't be a problem (since it wouldn't have problems installing the python dependencies)
alright, i got this to work by using direct upload in my CI: https://developers.cloudflare.com/pages/how-to/use-direct-upload-with-continuous-integration/#docs-content
Use Direct Upload with continuous integration · Cloudflare Pages docs
Documentation for Cloudflare Pages, the best way to deploy your static and JAMstack sites