Skip to content

Commit

Permalink
Merge pull request #21 from flownative/feature/flow-context-override
Browse files Browse the repository at this point in the history
Allow to override FLOW_CONTEXT with custom value
  • Loading branch information
kdambekalns authored Oct 2, 2024
2 parents e9a1578 + 6a072f7 commit 3a7d1c2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ similar mechanism in Kubernetes or your actual platform.
| BEACH_APPLICATION_CUSTOM_STARTUP_SCRIPTS_ENABLE | boolean | true | If custom startup scripts (beach-startup.sh) should be run |
| BEACH_FLOW_BASE_CONTEXT | string | Production | Base context, either "Development" or "Production" |
| BEACH_FLOW_SUB_CONTEXT | string | Instance | Sub context |
| BEACH_FLOW_CONTEXT | string | Production/Beach/Instance | (read-only) The actual Flow context; pattern: "{…BASE_CONTEXT}/Beach/{…SUB_CONTEXT}" |
| BEACH_FLOW_CONTEXT | string | Production/Beach/Instance | (read-only) The built Flow context; pattern: "{…BASE_CONTEXT}/Beach/{…SUB_CONTEXT}" |
| FLOW_CONTEXT | string | | The actual Flow context; default is BEACH_FLOW_CONTEXT |
| BEACH_ENVIRONMENT_VARIABLES_ALLOW_LIST | string | | If set, only these environment variables are promoted to the "beach" user's shell |
| BEACH_CRON_ENABLE | boolean | false | If user-defined cron-jobs (beach-cron-hourly.sh) should be enabled |

Expand Down
10 changes: 5 additions & 5 deletions root-files/opt/flownative/lib/beach.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ export BEACH_INSTANCE_NAME=${BEACH_INSTANCE_NAME:-}
export BEACH_PROJECT_NAME=${BEACH_PROJECT_NAME:-}
export BEACH_FLOW_BASE_CONTEXT=${BEACH_FLOW_BASE_CONTEXT:-Production}
export BEACH_FLOW_SUB_CONTEXT=${BEACH_FLOW_SUB_CONTEXT:-}
if [ -z ${BEACH_FLOW_SUB_CONTEXT} ]; then
export BEACH_FLOW_CONTEXT=${BEACH_FLOW_BASE_CONTEXT}/Beach/Instance
export BEACH_FLOW_SUB_CONTEXT=${BEACH_FLOW_SUB_CONTEXT:-Instance}
export BEACH_FLOW_CONTEXT=${BEACH_FLOW_BASE_CONTEXT}/Beach/${BEACH_FLOW_SUB_CONTEXT}
if [[ -v FLOW_CONTEXT ]]; then
export FLOW_CONTEXT
else
export BEACH_FLOW_CONTEXT=${BEACH_FLOW_BASE_CONTEXT}/Beach/${BEACH_FLOW_SUB_CONTEXT}
export FLOW_CONTEXT=${BEACH_FLOW_CONTEXT}
fi
export FLOW_CONTEXT=${BEACH_FLOW_CONTEXT}
export BEACH_DATABASE_HOST=${BEACH_DATABASE_HOST:-}
export BEACH_DATABASE_SOCKET=${BEACH_DATABASE_SOCKET:-}
Expand Down

0 comments on commit 3a7d1c2

Please sign in to comment.