Runing composer in a docker-compose configuration

I am workingn with the docker-compose.yml that I founded in the kikstart repo.
All works fine but I notice that composer it is in another container and also that after it runs the composer install command the continer dies.
Is that normal ?
I am trying to run some composer commands but i can’t find the way.
Any help welcome.

Hi @eduardo-g-silva, welcome to the LUYA Forum

That is correctly, the composer command is seperated inside a container based on the composer dockerfile and after installing the container and running its command, it will shutdown. (docker compose will run command: composer install when you do docker-compose up, see the docker-compose.yml)

In order to run composer commands try this:

docker-compose run luya_composer install

Where install is the command you like to run, for example composer update would be:

docker-compose run luya_composer update

Does that answer your question?

Amazing Thanks a lot I normaly have composer inside the php container but I guest it make sense.
I started with luya today and all makes perfect sense and I love it I will start migrating some projects into luya

1 Like