Preview not working for php project under docker

Hi,

To test idx, i imported one of my php projects which use docker.
My containers are working fine but i can’t access to my webpage in the preview.
Is there a configuration needed ?

I enabled docker service using this: services.docker.enable = true;

and tried this configuration for the preview :

web = {
          # Example: run "npm run dev" with PORT set to IDX's defined port for previews,
          # and show it in IDX's web preview panel
          command = ["php" "-S" "localhost:$PORT"];
          manager = "web";
          env = {
            # Environment variables to set for your server
            PORT = "80";
          };
        };

Thx for the help

I’m assuming docker here is used to package the php application. Are you trying to preview just the app (without the container) or the app that is already dockerized?

Is the php app listening to a port specified by the env var “PORT”? Since “PORT” is set internally, please remove it from the env block.

it’s to preview the php env which is already dockerized.

Had to delete all env = it caused an error for the preview to let it empty.

However, nothing is displayed