fly launch thinks I’m using a Django app, but I’m not.
I have an
app.py that only imports flask, and some stdlib stuff. I have a requirements.txt that only contains gunicorn and Flask.
I have two other directories called
results but neither of them contain
Any sense of what’s causing the
flyctl launch autodetection to do this incorrectly? Any way I can still get all the conveniences of autodetection, but by manually specifying I want to use
flask or such?
Okay, tried this out with the sample flask repo, and it still repros, probably a bug with not just my repository?
git clone https://github.com/fly-apps/python-hellofly-flask
Scanning source code
Detected a Django app
? App Name (leave blank to use an auto-generated name):
manage.py not found - which clearly indicates an issue with thinking we’re Django.
Sorry for this not-so-great first experience, indeed ou CLI is not properly detecting that this is not a Django app so that’s one thing we need to look into.
In the meantime, I’d suggest you change the Dockerfile to suit your needs. A proper Dockerfile for Flask might make your deployments go faster.
This could be the Dockerfile you need:
RUN pip3 install \\
COPY . /app
ENTRYPOINT \[ "flask" \]
CMD \[ "run", "--host", "0.0.0.0" \]
Taken from fly.io - deploying a Dockerfile to the cloud in seconds | Aaron Kelly’s Blog which has old
fly commands but the Dockerfile should still hold up
If anything happens let me know how I can help you! If possible post your
Thanks - got it working!
Would also be very cool if this gets fixes,
flask is the main framework I use for tiny apps and the promise of a one command, no config-fiddling deploy is very appealing