Revision #10 has been created by
rackycz on Oct 8, 2025, 1:28:04 PM with the memo:
edit
« previous (#9) next (#11) »
Changes
Title
unchanged
Yii3 - How to start
Category
unchanged
Tutorials
Yii version
unchanged
3.0
Tags
unchanged
Content
changed
[...]
To run composer (or any other command inside your dockerized yii3 application) you have 4 options:
- Make:
The best solution is to prepend the composer commands with "make".
> Other solutions:
> - Locally:>
>
- If you have Composer running locally, you can call these commands directly on your computer. (I do not recommend)
>
- Docker:
>
- You can SSH into your docker container and call it there as Composer is installed inside.
>
In that case:
> - Find the name of the PHP container by typing "docker ps"
and call:
>
> - Call "docker exec -it {containerName} /bin/bash
"
> Now you are in the console of your php server and you can run composer.
>
- PhpStorm:
>
- If you are using PhpStorm, find the small icon "Services" in the left lower corner (looks ca like a cog wheel), find item "Docker-compose: app-api", inside click the "app" service, then "yii3api_php" container and then hit the button "terminal" on the righthand side.
### **Setting up composer packages**
Follow their documentations. Quick links:
- https://github.com/yiisoft/db/blob/master/docs/guide/en/connection/mysql.md (I did not need the snippet with "new DsnSocket()")[...]