Yii3 - How to start

Comparing #64 with #65

Revision #65 was created by rackycz rackycz on Aug 30, 2026, 1:08:15 PM.

update

Content

[...]
In this text I am mainly working with API endpoints, but UI will be presented later as well.

## .env files

There are quite a lot of `.env` files which was confusing. But in short:
- File `/.env.example` should be copied and renamed to `/.env` only if you are NOT using Docker
 = on old webhostings, or if you are using local installation of PHP (xampp, wampp etc). - Then there are the `.env` files in the docker folder. To understand, just study file `./Makefile`. It is important to know that this file is here to call docker commands for you. Do not call docker manually. This is the important philosophy!. - In the `./Makefile` you will see command `include docker/.env` and below more `compose.yml` are loaded using the `-f` argument - So `docker/.env` is only visible in files `compose.yml` - If you need to inject any environment variable into your PHP application, you can see all used `.env` files place it into the `.env` files that are used inside (for example in) `docker/dev/compose.yml`.


## Running the demo application

You may be surprised that docker-compose.yml is missing in the root. Instead the "make up", "make stop" and "make down" commands are prepared.
[...]