Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invalid interpolation format for services.php.environment.TRUSTED_HOSTS. #792

Closed
toutvukantabu opened this issue May 16, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@toutvukantabu
Copy link

What happened?

Hy, i have an issue when trying to build the project for the first time. I get the following error:

invalid interpolation format for services.php.environment.MERCURE_PUBLIC_URL.
You may need to escape any $ with another $.
https://${SERVER_NAME:-localhost

Environment:

  • OS: Linux Mint
  • Docker version: Docker version 26.1.2, build 211e74b

Steps to Reproduce:

  1. Clone the repository.
  2. Run docker compose build --no-cache.

Expected Result:

The project should build without any errors.

Actual Result:

The build fails with the following error message:

invalid interpolation format for services.php.environment.MERCURE_PUBLIC_URL.
You may need to escape any $ with another $.
https://${SERVER_NAME:-localhost

Temporary Fix:

To fix the issue, I modified a line in the docker-compose.yaml file:

Old:

TRUSTED_HOSTS: ${TRUSTED_HOSTS:-^${SERVER_NAME:-example\.com|localhost}|php$$}

New:

TRUSTED_HOSTS: ${TRUSTED_HOSTS:-^$${SERVER_NAME:-example\.com|localhost}|php$$}

Question:

Is this a global issue or just limited to a certain configuration?

Build Type

Official static build

Worker Mode

No

Operating System

GNU/Linux

CPU Architecture

x86_64

PHP configuration

none

Relevant log output

No response

@toutvukantabu toutvukantabu added the bug Something isn't working label May 16, 2024
@dunglas
Copy link
Owner

dunglas commented May 16, 2024

It's unrelated to FrankenPHP, upgrading Docker Compose will fix the issue: dunglas/symfony-docker#616

@dunglas dunglas closed this as not planned Won't fix, can't repro, duplicate, stale May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants