Set up Mage Pro workspaces for organizing your own personal environment.
USER_CODE_PATH
USER_CODE_PATH
environment variable in the base project (Mage Pro management portal), update your Kubernetes configuration:
SHARE_SECRETS_ACROSS_WORKSPACES
then set the value to 1
to enable this feature. This will
allow developers to share their secrets across different workspaces within a cluster.
USER_DEFINED_VARS
is not set: all environment variables will be inherited automatically.USER_DEFINED_VARS
is set: only the specified variables will be inherited.DEV_ENV_*
).
USER_DEFINED_VARS
to define which variables to inherit:
ENV
variable:
{env_value}
: value of the ENV
variable in the workspace.{pattern}
: wildcard/regex pattern for matching variables.ENV=dev
inherits all variables matching DEV_ENV_*
.
get_custom_configs
method that returns a dictionary of configurations. This is where you can set up environment variables, modify container configurations, and prepare any necessary resources. The script executes before any workspace services start, making it ideal for initial setup and configuration tasks.