https://github.com/dmstr/docker-yii2-app
Dockerized application template for Yii 2.0 Framework
https://github.com/dmstr/docker-yii2-app
Last synced: 3 months ago
JSON representation
Dockerized application template for Yii 2.0 Framework
- Host: GitHub
- URL: https://github.com/dmstr/docker-yii2-app
- Owner: dmstr
- License: bsd-3-clause
- Created: 2016-05-12T19:06:02.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2023-07-31T17:34:52.000Z (almost 3 years ago)
- Last Synced: 2025-08-21T11:38:39.354Z (10 months ago)
- Language: PHP
- Homepage:
- Size: 86.9 KB
- Stars: 30
- Watchers: 5
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
Docker Yii 2.0 Application
==========================
:octocat: [`dmstr/docker-yii2-app`](https://github.com/dmstr/docker-yii2-app)
:wolf: [`dmstr/docker-yii2-app`](https://git.hrzg.de/dmstr/docker-yii2-app/pipelines)
:whale: [`dmstr/yii2-app`](https://hub.docker.com/r/dmstr/yii2-app/)
:cd: [`dmstr/php-yii2`](https://hub.docker.com/r/dmstr/php-yii2/)
[](https://travis-ci.org/dmstr/docker-yii2-app)
## Introduction
This is a minimal dockerized application template for Yii 2.0 Framework in about 100 lines of code.
## Requirements
- [Docker Toolbox](https://www.docker.com/products/docker-toolbox)
- Docker `>=1.10`
- docker-compose `>=1.7.0`
## Setup
Prepare `docker-compose` environment
cp .env-dist .env
and application
cp config/app.env-dist config/app.env
mkdir web/assets
Start stack
docker-compose up -d
Show containers
docker-compose ps
Run composer installation
docker-compose run --rm php composer install
## Develop
Create bash
docker-compose exec php bash
Run package update in container
$ composer update -v
...
$ yii help
## Test
cd tests
cp .env-dist .env
Run tests in codeception (`forrest`) container
d
docker-compose run forrest run
> :info: This is equivalent to `codecept run` inside the tester container
### CLI
docker run dmstr/yii2-app yii
## Resources
- [Changes](CHANGELOG.md)
- [Yii 2.0 Framework guide](http://www.yiiframework.com/doc-2.0/guide-index.html)
- [Yii 2.0 Docker Images](https://github.com/yiisoft/yii2-docker)
- [Docker documentation](https://docs.docker.com)
---
####  Built by [dmstr](http://diemeisterei.de)