diff --git a/yt_pubsub_handler/__init__.py b/yt_pubsub_handler/__init__.py index d3840d7..75e9e68 100644 --- a/yt_pubsub_handler/__init__.py +++ b/yt_pubsub_handler/__init__.py @@ -8,11 +8,14 @@ def create_app(test_config=None): + certs_dir = os.path.abspath(os.path.join( + os.path.dirname(__file__), 'certs')) + ssl_cert_path = os.path.join(certs_dir, 'ca-certificates.crt') app = Flask(__name__, instance_relative_config=True) app.config.from_mapping( SECRET_KEY=os.getenv("SECRET_KEY", 'dev'), SQLALCHEMY_DATABASE_URI=os.getenv( - "DATABASE_URL", "sqlite:///yt_pubsub_handler.db"), + "DATABASE_URL", "sqlite:///yt_pubsub_handler.db") + ssl_cert_path, SQLALCHEMY_TRACK_MODIFICATIONS=False, SCHEDULER_API_ENABLED=True ) diff --git a/zappa_settings.json b/zappa_settings.json index 2f9e95a..402c836 100644 --- a/zappa_settings.json +++ b/zappa_settings.json @@ -43,6 +43,8 @@ "expression": "rate(1 hour)" } ], - "remote_env": "s3://zappa-yt-pubsub-handler-production/env.json" + "remote_env": "s3://zappa-yt-pubsub-handler-production/env.json", + "extra_packages": ["certifi"], + "include": ["certs/ca-certificates.crt"] } }