I have a simple Nextjs app that I have successfully deployed on fly.io. One API route in it needs to run a python script using spawnSync
. It works just fine locally but that is because I have python3
already installed on my local machine.
To do this on Fly.io, I suspect I have to modify my dockerfile. Since this is my first time deploying a site where I have access to all of the configurations, I don’t want to mess with it without some advice.
How can I achieve this?
TLDR: On deployment, I want to ensure that python3
is available/installed and a few libraries from pip
are also installed. Preferably, this happens on the same app/machine as my Nextjs deployment.