diff --git a/notifier.staging.yaml b/notifier.staging.yaml new file mode 100644 index 00000000..036e7004 --- /dev/null +++ b/notifier.staging.yaml @@ -0,0 +1,24 @@ +runtime: python39 +service: notifier + +handlers: +- url: /tasks/detect-intent + script: auto + # Header checks prevent raw access to this handler. Tasks have headers. + +- url: /tasks/email-subscribers + script: auto + # Header checks prevent raw access to this handler. Tasks have headers. + +app_engine_apis: true + +# Set up VPC Access Connector for Redis. +vpc_access_connector: + name: projects/cr-status-staging/locations/us-central1/connectors/redis-connector + +env_variables: + DJANGO_SETTINGS_MODULE: 'settings' + DJANGO_SECRET: 'this-is-a-secret' + # Redis envs + REDISHOST: '10.231.56.251' + REDISPORT: '6379' diff --git a/notifier.yaml b/notifier.yaml index 036e7004..31ae1ad0 100644 --- a/notifier.yaml +++ b/notifier.yaml @@ -12,13 +12,13 @@ handlers: app_engine_apis: true -# Set up VPC Access Connector for Redis. +# Set up VPC Access Connector for Redis in prod. vpc_access_connector: - name: projects/cr-status-staging/locations/us-central1/connectors/redis-connector + name: projects/cr-status/locations/us-central1/connectors/redis-connector env_variables: DJANGO_SETTINGS_MODULE: 'settings' DJANGO_SECRET: 'this-is-a-secret' - # Redis envs - REDISHOST: '10.231.56.251' + # Redis envs for prod + REDISHOST: '10.250.3.187' REDISPORT: '6379' diff --git a/scripts/deploy_site.sh b/scripts/deploy_site.sh index 84e3ee50..313f38b5 100755 --- a/scripts/deploy_site.sh +++ b/scripts/deploy_site.sh @@ -11,9 +11,11 @@ deployVersion=$1 appName=${2:-cr-status} -deployYaml="app.staging.yaml" +deployAppYaml="app.staging.yaml" +deployNotifierYaml="notifier.staging.yaml" if [[ "${appName}" == "cr-status" ]]; then - deployYaml="app.yaml" + deployAppYaml="app.yaml" + deployNotifierYaml="notifier.yaml" fi usage="Usage: deploy.sh `date +%Y-%m-%d`" @@ -34,7 +36,7 @@ gcloud beta app deploy \ --project $appName \ --version $deployVersion \ --no-promote \ - $BASEDIR/../notifier.yaml \ - $BASEDIR/../$deployYaml \ + $BASEDIR/../$deployNotifierYaml \ + $BASEDIR/../$deployAppYaml \ $BASEDIR/../dispatch.yaml \ $BASEDIR/../cron.yaml