Hi, and thanks to everyone that has made Yii what it is today.
I had some thoughts about asset publishing in the context of Yii3 and docker.
I noticed the refactoring of Yii into modules for v3 and can’t help thinking that dockerization is a key motivation.
And if you think of Yii as modules with project templates i.e. basic vs advanced, and now yiisoft/yii-project-template… modules that manage assets need a hub to control where assets are published (file-system vs remote buckets).
That’s personal preferences. We should not require using docker as such. There are official Docker images already: https://github.com/yiisoft/yii2-docker
I’ve tried out yiisoft/yii2-docker and yiisoft/yii-docker and I’m using a modified version of yiisoft//yii2-app-basic as an SPA template. See: https://github.com/gazbond/yii2-app-basic.
I didn’t like yiisoft/yii2-app-advanced because I only need ‘frontend’ and ‘api’ and I like the simplicity of my data model being in the project root directory.
With yiisoft//yii2-app-basic I can specify my api as a module and then remap it with an api specific entry script and config file.
Which is what got be thinking about Yii modules and Docker.
Because if Yii becomes docker only, project templates can be used as docker containers. Provide an asset hub image (php/apache2/Yii), maybe a Yii hub container (also php/apache2/Yii), and then you can specify which api, frontend and backend containers you want with their corresponding repos.
I see. Thanks for reading my ramble, I was a bit over-excited about v3 possibilities
What’s the plan with Yii project template and application bases?
Would you use yiisoft/yii-project-template as top level project directory and checkout application bases into it?
I like the idea of having application bases that can also be modules. Load yiisoft/yii-base-api as a module in yiisoft/yii-base-web and also on its own as a Yii application.
DI’m thinking the following (which could allow multiple test containers):
frontend/
public/index.php <- run as vhost
composer.json
docker-compose.yml
backend/
public/index.php
config/modules.php <- load api + other
composer.json
docker-compose.yml
api/
public/index.php <- run as vhost
Module.php <- or as module
composer.json
docker-compose.yml
other/
Module.php <- only run as module
composer.json
vendor/
config/
runtime/
composer.json
docket-compose.yml <- run dev container