Invalid interpolation format for x-shared-env.COMPOSE_PROFILES #7392

Closed
opened 2026-02-21 18:20:23 -05:00 by yindo · 3 comments
Owner

Originally created by @hanktrizz on GitHub (Dec 25, 2024).

Originally assigned to: @hanktrizz on GitHub.

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.14.2

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Clone the latest source from https://github.com/langgenius/dify.git and follow the docker steps as outlined in the documentation page: https://docs.dify.ai/getting-started/install-self-hosted/docker-compose#starting-dify

✔️ Expected Behavior

Expected output of the containers, layers, images to be pulled smoothly and exiting successfully.

Actual Behavior

image

Instead, the interpolated environment variable, in particular, the COMPOSE_PROFILES is causing a problem due to a missing extra $ such that the correct version of the line should like this:
COMPOSE_PROFILES=$${VECTOR_STORE:-weaviate}

Originally created by @hanktrizz on GitHub (Dec 25, 2024). Originally assigned to: @hanktrizz on GitHub. ### Self Checks - [X] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [X] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.14.2 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce Clone the latest source from `https://github.com/langgenius/dify.git` and follow the docker steps as outlined in the documentation page: [https://docs.dify.ai/getting-started/install-self-hosted/docker-compose#starting-dify](url) ### ✔️ Expected Behavior Expected output of the containers, layers, images to be pulled smoothly and exiting successfully. ### ❌ Actual Behavior ![image](https://github.com/user-attachments/assets/625f9434-7070-4113-811d-ccdc86b3fb64) Instead, the interpolated environment variable, in particular, the `COMPOSE_PROFILES` is causing a problem due to a missing extra `$` such that the correct version of the line should like this: `COMPOSE_PROFILES=$${VECTOR_STORE:-weaviate}`
yindo added the good first issue label 2026-02-21 18:20:23 -05:00
yindo closed this issue 2026-02-21 18:20:23 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Dec 25, 2024):

Hey @hanktrizz! 👋 I'm here to help you with bug fixing, answering questions, and becoming a contributor. If you need assistance, feel free to ask.

The issue you're encountering with the "Invalid interpolation format" error in Docker Compose is likely due to incorrect syntax for environment variable interpolation. In Docker Compose files, the correct syntax for environment variable interpolation is ${VARIABLE_NAME:-default_value}. This allows you to specify a default value if the environment variable is not set.

For the COMPOSE_PROFILES variable, you should use the following format:

COMPOSE_PROFILES: ${VECTOR_STORE:-weaviate}

This syntax ensures that if VECTOR_STORE is not set, weaviate will be used as the default value. Make sure your Docker Compose file uses this format to avoid interpolation errors [1].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@dosubot[bot] commented on GitHub (Dec 25, 2024): <!-- Greeting --> Hey @hanktrizz! 👋 I'm here to help you with bug fixing, answering questions, and becoming a contributor. If you need assistance, feel free to ask. <!-- Answer --> The issue you're encountering with the "Invalid interpolation format" error in Docker Compose is likely due to incorrect syntax for environment variable interpolation. In Docker Compose files, the correct syntax for environment variable interpolation is `${VARIABLE_NAME:-default_value}`. This allows you to specify a default value if the environment variable is not set. For the `COMPOSE_PROFILES` variable, you should use the following format: ```yaml COMPOSE_PROFILES: ${VECTOR_STORE:-weaviate} ``` This syntax ensures that if `VECTOR_STORE` is not set, `weaviate` will be used as the default value. Make sure your Docker Compose file uses this format to avoid interpolation errors <sup>[[1]](https://github.com/langgenius/dify/blob/main/docker/docker-compose.yaml)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/d7688ea6-7aa0-4c2d-a772-9857620a7db7?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/d7688ea6-7aa0-4c2d-a772-9857620a7db7?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/d7688ea6-7aa0-4c2d-a772-9857620a7db7?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/d7688ea6-7aa0-4c2d-a772-9857620a7db7?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/d7688ea6-7aa0-4c2d-a772-9857620a7db7?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/d7688ea6-7aa0-4c2d-a772-9857620a7db7?feedback_type=other)</sup>
Author
Owner

@hanktrizz commented on GitHub (Dec 25, 2024):

@crazywoola would it be ok for me to fix this via a simple PR? Thanks.

@hanktrizz commented on GitHub (Dec 25, 2024): @crazywoola would it be ok for me to fix this via a simple PR? Thanks.
Author
Owner

@hanktrizz commented on GitHub (Dec 25, 2024):

Either way I have raised a PR for this issue here https://github.com/langgenius/dify/pull/12093

@hanktrizz commented on GitHub (Dec 25, 2024): Either way I have raised a PR for this issue here [https://github.com/langgenius/dify/pull/12093](url)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#7392