The minimum version of PHP required by this package is PHP 8.1.
To install this package, you need a composer.
You can then install this project template using the following command:
git clone https://github.com/yii-tools/demo.git demo
cd demo
composer update --prefer-dist -vvv
Run migrations:
./yii migrate/up --no-interaction
To launch the application for PHP built-in web server, run the following command:
composer run serve
To launch the application for RoadRunner web server, run the following command:
./vendor/bin/rr get-binary
./rr serve
Now you should be able to access the application through the URL printed to console. Usually it is http://localhost:8080.
You can then install this project template using docker with the following command:
git clone https://github.com/yii-tools/demo.git demo
cd demo
Build the container
docker compose build --no-cache && docker compose up -d
Update your vendor packages
docker exec -it yii3-demo composer update --prefer-dist -vvv
Run migrations
docker exec -it yii3-demo php yii migrate/up --no-interaction
Change directory owner (optional, if encounter db write problem or upload file problem)
docker exec -it yii3-demo bash
chown www-data:www-data -R resources/db && chown www-data:www-data -R public/avatar
You can then access the application through the following URL:
http://127.0.0.1:8100
The application template has the following structure directory:
root
├── config Configuration files.
│ └── common Common configuration files.
│ └── web Web configuration files.
│ └── application-params.php Application parameters.
│ └── params.php Params configuration.
│ └── routes.php Application routes.
├── public Files publicly accessible from the Internet.
│ └── assets Published assets.
│ └── avatar Avatar images.
│ └── index.php Entry script.
│ └── index-rr.php Entry script for RoadRunner.
├── resources Application resources.
│ └── assets Custom assets.
│ └── messages Message translations.
│ └── layout Layout templates.
│ └── view View templates.
├── runtime Files generated during runtime.
├── src Application source code.
│ └── Asset Asset bundle definitions.
│ └── Command Console commands.
│ └── Controller Web controller classes.
│ └── Handler Handlers for events.
| └── Installer.php Installer.
├── .env Environment variables.
├── .rr-yaml RoadRunner configuration.
├── codeception.yml Codeception configuration.
├── composer.json Composer configuration.
├── di-container.php Dependency injection container configuration.
├── tailwind.config.js Tailwind CSS configuration.
If you want to customize your demo, read the docs.
The MIT License (MIT). Please see License File for more information.