As I was following the documentation regarding of deploying in app-platform, I am using flask and I successfully deployed the application. It showed the login UI and then when I attempt to login, internal error problem. I tracked the runtime logs showing “no table user exist”. I tried to check in my cli the mysql connection using the flags and after I checked the user and other table existed, this is very weird problem. How can I fix this?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hey there! 👋
After deploying your app, do you by any chance run your database migrations as well?
If your app requires migrations to set up tables (e.g., using Flask-Migrate or SQLAlchemy), you need to make sure that these migrations are run as part of your deployment/run process. App Platform deployments don’t automatically run migrations unless you include a step for it.
If you haven’t already, add a migration step to your start
or deploy
command in the App Platform configuration. For example:
flask db upgrade && gunicorn -w 4 -b 0.0.0.0:8080 app:app
You can change the gunicorn
based on your needs if needed.
Let me know how it goes!
- Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.