Skip to content

Commit

Permalink
Use DB_NAME instead of DATABASE_NAME (#141)
Browse files Browse the repository at this point in the history
  • Loading branch information
ColinToft authored Jun 2, 2024
1 parent 203a524 commit 484e61c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/actions/heroku-deploy/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ runs:
config() {
heroku config:set "$1"="$2" -a "${{ inputs.appName }}"
}
config MG_DATABASE_NAME "${{ inputs.databaseName }}"
config MG_DB_NAME "${{ inputs.databaseName }}"
config MG_DATABASE_URL "${{ inputs.databaseUrl }}"
config FIREBASE_WEB_API_KEY "${{ inputs.firebaseApiKey }}"
config FIREBASE_REQUEST_URI "${{ inputs.firebaseRequestUri }}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/staging-heroku-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
email: "${{ secrets.HEROKU_EMAIL }}"
apiKey: "${{ secrets.HEROKU_API_KEY }}"
appName: "${{ secrets.DEV_PROJECT_ID }}"
databaseName: "${{ secrets.DEV_MG_DATABASE_NAME }}"
databaseName: "${{ secrets.DEV_MG_DB_NAME }}"
databaseUrl: "${{ secrets.DEV_MG_DATABASE_URL }}"
firebaseApiKey: "${{ secrets.DEV_FIREBASE_WEB_API_KEY }}"
firebaseRequestUri: "${{ secrets.DEV_FIREBASE_REQUEST_URI }}"
Expand Down
2 changes: 1 addition & 1 deletion backend/app/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Config(object):
# put any configurations here that are common across all environments
# list of available configs: https://flask.palletsprojects.com/en/1.1.x/config/
MONGODB_URL = os.getenv("MG_DATABASE_URL")
MONGODB_DB_NAME = os.getenv("MG_DATABASE_NAME")
MONGODB_DB_NAME = os.getenv("MG_DB_NAME")


class DevelopmentConfig(Config):
Expand Down
2 changes: 1 addition & 1 deletion backend/app/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ def init_app(app):
db=app.config["MONGODB_DB_NAME"],
)
else:
raise Exception("MG_DATABASE_URL and MG_DATABASE_NAME must be set in the env file.")
raise Exception("MG_DATABASE_URL and MG_DB_NAME must be set in the env file.")

0 comments on commit 484e61c

Please sign in to comment.