0

I created a social media site as a project following this tutorial (https://www.youtube.com/watch?v=MwZwr5Tvyxo&list=PL-osiE80TeTs4UjLw5MM6OjgkjFeUxCYH) . On the web app, users can create an account and make their own posts.

This all works on my local machine pre-deployment. But when I deploy the app via google cloud, users are not able to create an account. The error message that shows on my logs is "OperationalError: attempt to write a readonly database". What is going on here and how do I go about fixing this?

Here is the Config for the app:

class Config:
    SECRET_KEY = os.environ.get('SECRET_KEY')
    if SECRET_KEY == None:
        SECRET_KEY = '447cc3d7257853eafabc30fd9c373ff8'
    SQLALCHEMY_DATABASE_URI = os.environ.get('SQLALCHEMY_DATABASE_URL')
    if SQLALCHEMY_DATABASE_URI == None:
        SQLALCHEMY_DATABASE_URI = 'sqlite:///site.db'
    MAIL_SERVER = 'smtp.gmail.com'
    MAIL_PORT = 587
    MAIL_USE_TLS = True
    MAIL_USERNAME = 'noreplyb77988443@gmail.com'
    MAIL_PASSWORD = os.environ.get('EMAIL_PASS')
David Browne - Microsoft
  • 66,275
  • 5
  • 31
  • 57