Skip to content

Commit

Permalink
db url fix for each env (#43)
Browse files Browse the repository at this point in the history
* db url fix for each env

* db url fix for each env

* db url fix for each env
  • Loading branch information
nuwan-samarasinghe authored Sep 18, 2024
1 parent 319d2db commit 553af3c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 2 additions & 0 deletions config/envs/default.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import logging
from os import getenv
from os import environ

from fsd_utils import configclass

Expand All @@ -15,3 +16,4 @@ class DefaultConfig(object):
FAB_SAVE_PER_PAGE = getenv("FAB_SAVE_PER_PAGE", "dev/save")
FORM_RUNNER_URL = getenv("FORM_RUNNER_INTERNAL_HOST", "http://form-runner:3009")
FORM_RUNNER_URL_REDIRECT = getenv("FORM_RUNNER_EXTERNAL_HOST", "http://localhost:3009")
SQLALCHEMY_DATABASE_URI = environ.get("DATABASE_URL")
2 changes: 0 additions & 2 deletions config/envs/dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,3 @@
class DevConfig(DefaultConfig):
FSD_LOGGING_LEVEL = logging.INFO
SQLALCHEMY_TRACK_MODIFICATIONS = False

SQLALCHEMY_DATABASE_URI = environ.get("DATABASE_URL").replace("postgres://", "postgresql://")
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ Outputs:
Description: "The URL of this database."
Value:
!Sub
- "postgres://${USERNAME}:${PASSWORD}@${HOSTNAME}:${PORT}/${DBNAME}"
- "postgresql://${USERNAME}:${PASSWORD}@${HOSTNAME}:${PORT}/${DBNAME}"
- USERNAME: !Join [ "", [ '{{resolve:secretsmanager:', !Ref fsdfundapplicationbuilderclusterAuroraSecret, ":SecretString:username}}" ]] # pragma: allowlist secret
PASSWORD: !Join [ "", [ '{{resolve:secretsmanager:', !Ref fsdfundapplicationbuilderclusterAuroraSecret, ":SecretString:password}}" ]] # pragma: allowlist secret
HOSTNAME: !Join [ "", [ '{{resolve:secretsmanager:', !Ref fsdfundapplicationbuilderclusterAuroraSecret, ":SecretString:host}}" ]] # pragma: allowlist secret
Expand Down
2 changes: 1 addition & 1 deletion copilot/fsd-fund-application-builder/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ http:
path: '/'
# You can specify a custom health check path. The default is "/".
#healthcheck: '/healthcheck'
#alias: fund-application-builder.${COPILOT_ENVIRONMENT_NAME}.access-funding.test.levellingup.gov.uk
alias: fund-application-builder.${COPILOT_ENVIRONMENT_NAME}.access-funding.test.levellingup.gov.uk

# Configuration for your containers and service.
image:
Expand Down

0 comments on commit 553af3c

Please sign in to comment.