mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-14 08:37:03 +02:00
Try harder to get migration right
This commit is contained in:
parent
ca99231165
commit
6460bd1cc6
2 changed files with 32 additions and 2 deletions
|
@ -40,7 +40,7 @@ then
|
|||
fi
|
||||
|
||||
echo "Creating manifest for $1..."
|
||||
cp ops/scripts/manifest-sandbox-template.yaml ops/manifests/manifest-$1.yaml
|
||||
cp ops/scripts/manifest-sandbox-template-migrate.yaml ops/manifests/manifest-$1.yaml
|
||||
sed -i '' "s/ENVIRONMENT/$1/" "ops/manifests/manifest-$1.yaml"
|
||||
|
||||
echo "Adding new environment to settings.py..."
|
||||
|
@ -129,7 +129,7 @@ then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
cf service-key github-cd-account github-cd-key | sed 1,2d | jq -r '[.username, .password]|@tsv' |
|
||||
cf service-key github-cd-account github-cd-key | sed 1,2d | jq -r '[.credentials.username, .credentials.password]|@tsv' |
|
||||
while read -r username password; do
|
||||
gh secret --repo cisagov/getgov set CF_${upcase_name}_USERNAME --body $username
|
||||
gh secret --repo cisagov/getgov set CF_${upcase_name}_PASSWORD --body $password
|
30
ops/scripts/manifest-sandbox-template-migrate.yaml
Normal file
30
ops/scripts/manifest-sandbox-template-migrate.yaml
Normal file
|
@ -0,0 +1,30 @@
|
|||
---
|
||||
applications:
|
||||
- name: getgov-ENVIRONMENT
|
||||
buildpacks:
|
||||
- python_buildpack
|
||||
path: ../../src
|
||||
instances: 1
|
||||
memory: 512M
|
||||
stack: cflinuxfs4
|
||||
timeout: 180
|
||||
command: ./run.sh
|
||||
health-check-type: http
|
||||
health-check-http-endpoint: /health
|
||||
env:
|
||||
# Send stdout and stderr straight to the terminal without buffering
|
||||
PYTHONUNBUFFERED: yup
|
||||
# Tell Django where to find its configuration
|
||||
DJANGO_SETTINGS_MODULE: registrar.config.settings
|
||||
# Tell Django where it is being hosted
|
||||
DJANGO_BASE_URL: https://getgov-ENVIRONMENT.app.cloud.gov
|
||||
# Tell Django how much stuff to log
|
||||
DJANGO_LOG_LEVEL: INFO
|
||||
# default public site location
|
||||
GETGOV_PUBLIC_SITE_URL: https://beta.get.gov
|
||||
# use a non-default route to avoid conflicts
|
||||
routes:
|
||||
- route: getgov-ENVIRONMENT-migrate.app.cloud.gov
|
||||
services:
|
||||
- getgov-credentials
|
||||
- getgov-ENVIRONMENT-database
|
Loading…
Add table
Add a link
Reference in a new issue