Difference between #40 and #41 of
Yii3 - How to start

Revision #41 has been created by rackycz rackycz on Oct 16, 2025, 7:27:01 AM with the memo:

edit
« previous (#40)

Changes

Title unchanged

Yii3 - How to start

Category unchanged

Tutorials

Yii version unchanged

3.0

Tags unchanged

Content changed

[...]
If you don't have Docker, I recommend installing the **latest** version of Docker Desktop:
- https://docs.docker.com/get-started/introduction/get-docker-desktop/

## Running the demo application

You may be surprised that docker-compose.yml is missing in the root. Instead the "make
 up" and "make down" commands are prepared.
If you run both basic commands as mentioned in the documentation:
[...]
If you want to modify the data that was returned by the endpoint, just open the action-class `src/Api/IndexAction.php` and add one more element to the returned array.

> You may be missing 'docker compose stop' or 'make stop', because 'make down' removes your containers and drops your DB. In that case you can add it to the Makefile in the root (see below). If you then type 'make help' you will see the new command. 
 
 
```sh
 
ifeq ($(PRIMARY_GOAL),stop)
 
stop: ## Stop the dev environment
 
$(DOCKER_COMPOSE_DEV) stop
 
endif
 
```
 
 
## Adding DB into your project

Your project now does not contain any DB. Let's add MariaDB and Adminer (DB browser) into file docker/dev/compose.yml:

In my case the resulting file looks like this:
[...]
2 0
5 followers
Viewed: 42 299 times
Version: 3.0
Category: Tutorials
Tags:
Written by: rackycz rackycz
Last updated by: rackycz rackycz
Created on: Oct 8, 2025
Last updated: 2 months ago
Update Article

Revisions

View all history