Skip to content

Commit

Permalink
Charming Charmhub - PaaS flask app (#1906)
Browse files Browse the repository at this point in the history
* chore: import app in app.py

This is required for PaaS app charmer

* chore: add .rock and .charm to gitignore

* chore: create rockcraft.yaml

using `rockcraft init --profile flask-framework`
  • Loading branch information
M7mdisk authored Jul 26, 2024
1 parent b728436 commit 644d850
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,6 @@ bower_components/
*.log

build/
dist/
dist/
*.charm
*.rock
6 changes: 6 additions & 0 deletions app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import os

# canonicalwebteam.flask-base requires SECRET_KEY to be set, this must be done before importing the app
os.environ["SECRET_KEY"] = os.environ["FLASK_SECRET_KEY"]

from webapp_beta.app import app
21 changes: 21 additions & 0 deletions rockcraft.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: charmhub-io
base: [email protected]
version: "0.1"
summary: Rocked charmhub.io
description: |
This is the rockcraft for the charmhub.io website.
platforms:
amd64:

extensions:
- flask-framework

parts:
flask-framework/install-app:
prime:
- flask/app/.env
- flask/app/app.py
- flask/app/webapp
- flask/app/webapp_beta
- flask/app/templates
- flask/app/static

0 comments on commit 644d850

Please sign in to comment.