Skip to content

Commit

Permalink
Make parallel deployments easier
Browse files Browse the repository at this point in the history
* Rename stuff to be clearer that the "slug" isn't random
* Include the slug in the app name to facilitate parallel deployments
    in the same space.
* Default to 1 image, so you can fit two deployments in a 1G sandbox
    space
  • Loading branch information
mogul committed Mar 29, 2024
1 parent 4a1c93f commit 2a04d3d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
22 changes: 11 additions & 11 deletions manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@ defaults: &defaults
- ((db-instance))
disk_quota: 3G
memory: 256M
instances: 2
instances: 1

applications:

################################
- name: spiffworkflow-frontend
- name: spiffworkflow((slug))-frontend
<<: *defaults
routes:
- route: spiffworkflow-((randomish-route)).app.cloud.gov
- route: spiffworkflow((slug)).app.cloud.gov
docker:
image: ((frontend-image))
env:
APPLICATION_ROOT: "/"
PORT0: "8080"
SPIFFWORKFLOW_FRONTEND_RUNTIME_CONFIG_APP_ROUTING_STRATEGY: "path_based"
SPIFFWORKFLOW_FRONTEND_RUNTIME_CONFIG_BACKEND_BASE_URL: "https://spiffworkflow-((randomish-route)).app.cloud.gov/api"
BACKEND_BASE_URL: "https://spiffworkflow-((randomish-route)).app.cloud.gov/api"
SPIFFWORKFLOW_FRONTEND_RUNTIME_CONFIG_BACKEND_BASE_URL: "https://spiffworkflow((slug)).app.cloud.gov/api"
BACKEND_BASE_URL: "https://spiffworkflow((slug)).app.cloud.gov/api"
# We may need to set BACKEND_URL; see spiffworkflow-frontend/src/config/tsx:15-72

# WHERE WE STOPPED:
Expand All @@ -43,12 +43,12 @@ applications:

#################################

- name: spiffworkflow-backend
- name: spiffworkflow((slug))-backend
<<: *defaults
disk_quota: 3G
health_check_type: process
routes:
- route: spiffworkflow-((randomish-route)).app.cloud.gov/api
- route: spiffworkflow((slug)).app.cloud.gov/api

# With buildpack:
# path: spiffworkflow-backend
Expand Down Expand Up @@ -91,10 +91,10 @@ applications:
# vars.yml (or CLI)
FLASK_SESSION_SECRET_KEY: ((flask-session-key))
SPIFFWORKFLOW_BACKEND_OPEN_ID_CLIENT_SECRET_KEY: "((openid-secret))"
SPIFFWORKFLOW_BACKEND_OPEN_ID_SERVER_URL: "https://spiffworkflow-((randomish-route)).app.cloud.gov/api/openid"
SPIFFWORKFLOW_BACKEND_URL: "https://spiffworkflow-((randomish-route)).app.cloud.gov/api"
SPIFFWORKFLOW_BACKEND_URL_FOR_FRONTEND: "https://spiffworkflow-((randomish-route)).app.cloud.gov/api"
SPIFFWORKFLOW_BACKEND_CONNECTOR_PROXY_URL: "https://spiffworkflow-connector-((randomish-route)).app.cloud.gov"
SPIFFWORKFLOW_BACKEND_OPEN_ID_SERVER_URL: "https://spiffworkflow((slug)).app.cloud.gov/api/openid"
SPIFFWORKFLOW_BACKEND_URL: "https://spiffworkflow((slug)).app.cloud.gov/api"
SPIFFWORKFLOW_BACKEND_URL_FOR_FRONTEND: "https://spiffworkflow((slug)).app.cloud.gov/api"
SPIFFWORKFLOW_BACKEND_CONNECTOR_PROXY_URL: "https://spiffworkflow-connector((slug)).app.cloud.gov"

# - SPIFFWORKFLOW_BACKEND_DATABASE_URI=mysql+mysqldb://root:${SPIFFWORKFLOW_BACKEND_MYSQL_ROOT_DATABASE:-my-secret-pw}@127.0.0.1:7003/${SPIFFWORKFLOW_BACKEND_DATABASE_NAME:-spiffworkflow_backend_development}
# - SPIFFWORKFLOW_BACKEND_OPEN_ID_SERVER_URL=http://localhost:7002/realms/spiffworkflow
Expand Down
6 changes: 5 additions & 1 deletion vars.yml-template
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@ frontend-image: ghcr.io/gsa-tts/spiffworkflow-frontend:deploy-to-cloud-gov-lates
db-instance: spiffworkflow-db
flask-session-key: 66eef9e98a3f4e6f85258154e4a1bdce
openid-secret: flarblegarble
randomish-route: flamingo-stardust

# The "slug" is a URL-friendly string that can be used to distinguish between
# deployments. It will be including in app names and generated URLs. (You can leave
# this empty for an "official" deployment.)
slug: -flamingo-stardust

0 comments on commit 2a04d3d

Please sign in to comment.