symfony-docker icon indicating copy to clipboard operation
symfony-docker copied to clipboard

Serving Symfony Welcome Page with Docker Compose Opens phpinfo() Instead

Open Salhi-Yassine opened this issue 1 year ago • 0 comments

Title

Serving Symfony Welcome Page with Docker Compose Opens phpinfo() Instead

Description

I encountered an issue when trying to run the Symfony Docker setup as described in the documentation. After following the steps, I found that navigating to the server name in my browser opens the phpinfo() page instead of the Symfony welcome page.

Steps to Reproduce

  1. Clone the repository:
    git clone https://github.com/dunglas/symfony-docker.git
    cd symfony-docker
    
  2. Build the Docker images without cache:
    docker compose build --no-cache
    
  3. Run the application with the following command:
    SERVER_NAME=your-domain-name.example.com \
    APP_SECRET=ChangeMe \
    CADDY_MERCURE_JWT_SECRET=ChangeThisMercureHubJWTSecretKey \
    docker compose -f compose.yaml -f compose.prod.yaml up -d --wait
    
  4. Navigate to http://your-domain-name.example.com in a web browser.

Expected Behavior

I expected to see the Symfony welcome page.

Actual Behavior

The browser opens the phpinfo() page instead of the Symfony welcome page.

Additional Context

When I run the following command, the Symfony welcome page is displayed correctly:

docker run \
    -e FRANKENPHP_CONFIG="worker ./public/index.php" \
    -e APP_RUNTIME=Runtime\\FrankenPhpSymfony\\Runtime \
    -e SERVER_NAME=your-domain-name.example.com \
    -v $PWD:/app \
    -p 80:80 -p 443:443 -p 443:443/udp \
    dunglas/frankenphp

Salhi-Yassine avatar May 15 '24 20:05 Salhi-Yassine