diff --git a/src/schemas/json/monade-stack-config.json b/src/schemas/json/monade-stack-config.json index e2b14ca639e..0db3caaf361 100644 --- a/src/schemas/json/monade-stack-config.json +++ b/src/schemas/json/monade-stack-config.json @@ -13,7 +13,27 @@ "type": "string", "enum": ["system", "local"], "default": "system", - "description": "Specifies whether to use the system-wide nginx service or spawn a local nginx process among other services. If not specified, 'system' is implied. Local nginx requires an nginx binary in the path. System wide nginx configuration is left to the user." + "description": "Specifies whether to use the system-wide nginx service or spawn a local nginx process among other services. If not specified, 'system' is implied. Local nginx requires an nginx binary in the path. System wide nginx configuration is left to the user.", + "oneOf": [ + { "const": "system", "description": "Use system nginx" }, + { "const": "local", "description": "Use local nginx process" } + ], + "x-intellij-enum-metadata": { + "system": { + "description": "Use system nginx" + }, + "local": { + "description": "Use local nginx process" + } + } + }, + "on_stop": { + "type": "string", + "description": "A command to be run when the stack is stopped. The command will be run in a shell, so you can use shell features like pipes and redirects.", + "examples": [ + "docker-compose -f docker-compose.override.yml down", + "echo 'Stack stopped' >> ~/stack.log" + ] }, "services": { "type": "object", @@ -63,7 +83,7 @@ }, "env": { "type": "array", - "description": "A list of environment variables to be set for the command. Each item in the list should be a string in the form of `KEY=VALUE`", + "description": "A list of environment variables to be set for the command. Each item in the list should be a string in the form of `KEY=VALUE`. These variables take precedence over variables set in `env_file` and `env_files`. All values are treated as literal strings", "examples": ["FOO=bar", "BAZ=qux"], "items": { "type": "string" @@ -72,7 +92,16 @@ }, "env_file": { "type": "string", - "description": "If set all environment variables in the file will be set for the command. The file should be in the format of `KEY=VALUE` with each key-value pair on a new line" + "description": "If set all environment variables in the file will be set for the command. The file should be in the format of `KEY=VALUE` with each key-value pair on a new line. All values are treated as literal strings" + }, + "env_files": { + "type": "array", + "description": "A list of files from which environment variables will be set for the command. Each file should be in the format of `KEY=VALUE` with each key-value pair on a new line. All values are treated as literal strings. If the same variable is set in multiple files, the last file in the list will take precedence. These files takes precedence over `env_file` but are overridden by `env` variables", + "examples": [".env", ".env.local"], + "items": { + "type": "string" + }, + "uniqueItems": true }, "domains": { "type": "array", diff --git a/src/schemas/json/pubspec.json b/src/schemas/json/pubspec.json index c891dc89adb..7760302b56e 100644 --- a/src/schemas/json/pubspec.json +++ b/src/schemas/json/pubspec.json @@ -115,10 +115,17 @@ "ref": { "type": "string", "description": "The branch, tag, or anything else Git allows to identify a commit." + }, + "tag_pattern": { + "type": "string", + "description": "Pattern for matching git tags with version placeholders" } } } ] + }, + "version": { + "$ref": "#/definitions/versionConstraint" } }, "required": ["git"], diff --git a/src/schemas/json/starlake.json b/src/schemas/json/starlake.json index 28500c35fb4..0610af7e35b 100644 --- a/src/schemas/json/starlake.json +++ b/src/schemas/json/starlake.json @@ -2007,6 +2007,14 @@ "$ref": "#/definitions/ConvertibleToString", "description": "DAG generation config folder. metadata/dags by default" }, + "types": { + "$ref": "#/definitions/ConvertibleToString", + "description": "types config folder. metadata/types by default" + }, + "macros": { + "$ref": "#/definitions/ConvertibleToString", + "description": "macros config folder. metadata/macros by default" + }, "tests": { "$ref": "#/definitions/ConvertibleToString", "description": "Path to tests folder. Default is ${metadata}/tests" diff --git a/src/test/monade-stack-config/example.yaml b/src/test/monade-stack-config/example.yaml index 94cdc46fdef..5dbf402c14b 100644 --- a/src/test/monade-stack-config/example.yaml +++ b/src/test/monade-stack-config/example.yaml @@ -1,6 +1,7 @@ # yaml-language-server: $schema=../../schemas/json/monade-stack-config.json name: myapp nginx: local +on_stop: echo "App stopped" services: api: command: 'yarn dev' @@ -11,6 +12,10 @@ services: env: - FRONTEND_URL=https://app.test - API_PORT=8000 + env_files: + - .env # shared env file + - .api.env # specific to this service + - .secrets.env # ignored in git domains: - api.test frontend: @@ -19,7 +24,9 @@ services: port: 4200 autostart: true stop_sequence: 'C-c' - env_file: .frontend.env + env_files: + - .env + - .frontend.env domains: - app.test nginx_server_options: @@ -30,6 +37,7 @@ services: autostart: false mailhog: command: mailhog + env_file: .mailhog.env autostart: false bastion: user: username