mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-06-29 15:53:31 +02:00
Add infrastructure for Development environment
This commit is contained in:
parent
c19c565210
commit
46dfd79275
6 changed files with 79 additions and 4 deletions
41
.github/workflows/deploy-development.yaml
vendored
Normal file
41
.github/workflows/deploy-development.yaml
vendored
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
# This workflow runs on pushes to main
|
||||||
|
# any merge/push to main will result in development being deployed
|
||||||
|
|
||||||
|
name: Build and deploy development for release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths-ignore:
|
||||||
|
- 'docs/**'
|
||||||
|
- '**.md'
|
||||||
|
- '.gitignore'
|
||||||
|
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy-development:
|
||||||
|
if: ${{ github.ref_type == 'tag' }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Compile USWDS assets
|
||||||
|
working-directory: ./src
|
||||||
|
run: |
|
||||||
|
docker compose run node npm install &&
|
||||||
|
docker compose run node npx gulp copyAssets &&
|
||||||
|
docker compose run node npx gulp compile
|
||||||
|
- name: Collect static assets
|
||||||
|
working-directory: ./src
|
||||||
|
run: docker compose run app python manage.py collectstatic --no-input
|
||||||
|
- name: Deploy to cloud.gov sandbox
|
||||||
|
uses: 18f/cg-deploy-action@main
|
||||||
|
env:
|
||||||
|
DEPLOY_NOW: thanks
|
||||||
|
with:
|
||||||
|
cf_username: ${{ secrets.CF_DEVELOPMENT_USERNAME }}
|
||||||
|
cf_password: ${{ secrets.CF_DEVELOPMENT_PASSWORD }}
|
||||||
|
cf_org: cisa-dotgov
|
||||||
|
cf_space: development
|
||||||
|
push_arguments: "-f ops/manifests/manifest-development.yaml"
|
1
.github/workflows/migrate.yaml
vendored
1
.github/workflows/migrate.yaml
vendored
|
@ -15,6 +15,7 @@ on:
|
||||||
options:
|
options:
|
||||||
- stable
|
- stable
|
||||||
- staging
|
- staging
|
||||||
|
- development
|
||||||
- ky
|
- ky
|
||||||
- es
|
- es
|
||||||
- nl
|
- nl
|
||||||
|
|
2
.github/workflows/reset-db.yaml
vendored
2
.github/workflows/reset-db.yaml
vendored
|
@ -14,8 +14,8 @@ on:
|
||||||
type: choice
|
type: choice
|
||||||
description: Which environment should we flush and re-load data for?
|
description: Which environment should we flush and re-load data for?
|
||||||
options:
|
options:
|
||||||
- stable
|
|
||||||
- staging
|
- staging
|
||||||
|
- development
|
||||||
- ky
|
- ky
|
||||||
- es
|
- es
|
||||||
- nl
|
- nl
|
||||||
|
|
32
ops/manifests/manifest-development.yaml
Normal file
32
ops/manifests/manifest-development.yaml
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
---
|
||||||
|
applications:
|
||||||
|
- name: getgov-development
|
||||||
|
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
|
||||||
|
health-check-invocation-timeout: 40
|
||||||
|
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-development.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
|
||||||
|
# Flag to disable/enable features in prod environments
|
||||||
|
IS_PRODUCTION: False
|
||||||
|
routes:
|
||||||
|
- route: getgov-development.app.cloud.gov
|
||||||
|
services:
|
||||||
|
- getgov-credentials
|
||||||
|
- getgov-development-database
|
|
@ -43,7 +43,7 @@ cp ops/scripts/manifest-sandbox-template.yaml ops/manifests/manifest-$1.yaml
|
||||||
sed -i '' "s/ENVIRONMENT/$1/" "ops/manifests/manifest-$1.yaml"
|
sed -i '' "s/ENVIRONMENT/$1/" "ops/manifests/manifest-$1.yaml"
|
||||||
|
|
||||||
echo "Adding new environment to settings.py..."
|
echo "Adding new environment to settings.py..."
|
||||||
sed -i '' '/getgov-staging.app.cloud.gov/ {a\
|
sed -i '' '/getgov-development.app.cloud.gov/ {a\
|
||||||
'\"getgov-$1.app.cloud.gov\"',
|
'\"getgov-$1.app.cloud.gov\"',
|
||||||
}' src/registrar/config/settings.py
|
}' src/registrar/config/settings.py
|
||||||
|
|
||||||
|
@ -105,11 +105,11 @@ echo
|
||||||
echo "Moving on to setup Github automation..."
|
echo "Moving on to setup Github automation..."
|
||||||
|
|
||||||
echo "Adding new environment to Github Actions..."
|
echo "Adding new environment to Github Actions..."
|
||||||
sed -i '' '/ - staging/ {a\
|
sed -i '' '/ - development/ {a\
|
||||||
- '"$1"'
|
- '"$1"'
|
||||||
}' .github/workflows/reset-db.yaml
|
}' .github/workflows/reset-db.yaml
|
||||||
|
|
||||||
sed -i '' '/ - staging/ {a\
|
sed -i '' '/ - development/ {a\
|
||||||
- '"$1"'
|
- '"$1"'
|
||||||
}' .github/workflows/migrate.yaml
|
}' .github/workflows/migrate.yaml
|
||||||
|
|
||||||
|
|
|
@ -619,6 +619,7 @@ SECURE_SSL_REDIRECT = True
|
||||||
ALLOWED_HOSTS = [
|
ALLOWED_HOSTS = [
|
||||||
"getgov-stable.app.cloud.gov",
|
"getgov-stable.app.cloud.gov",
|
||||||
"getgov-staging.app.cloud.gov",
|
"getgov-staging.app.cloud.gov",
|
||||||
|
"getgov-development.app.cloud.gov",
|
||||||
"getgov-ky.app.cloud.gov",
|
"getgov-ky.app.cloud.gov",
|
||||||
"getgov-es.app.cloud.gov",
|
"getgov-es.app.cloud.gov",
|
||||||
"getgov-nl.app.cloud.gov",
|
"getgov-nl.app.cloud.gov",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue