PHPackages                             phundament/app - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. phundament/app

AbandonedArchivedProject[Framework](/categories/framework)

phundament/app
==============

12factor Application Template for Yii 2.0 Framework

4.5.0(8y ago)31411.8k123[26 issues](https://github.com/phundament/app/issues)[4 PRs](https://github.com/phundament/app/pulls)BSD-3-ClausePHP

Since Apr 7Pushed 5y ago43 watchersCompare

[ Source](https://github.com/phundament/app)[ Packagist](https://packagist.org/packages/phundament/app)[ Docs](http://www.phundament.com/)[ RSS](/packages/phundament-app/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (10)Dependencies (5)Versions (100)Used By (0)

🚨 THIS PROJECT IS DEPRECATED - Next version [phd5](https://github.com/dmstr/phd5-app) is available
--------------------------------------------------------------------------------------------------

[](#rotating_light-this-project-is-deprecated---next-version-phd5-is-available)

---

phd4
====

[](#phd4)

*formerly known as Phundament 4*

phd is a dockerized 12factor PHP application template for Yii Framework 2.0.

- Full [documentation](https://github.com/phundament/docs)
- [Demo](https://github.com/phundament/playground) at Phundament playground

Requirements
------------

[](#requirements)

- [docker](https://docs.docker.com/engine/installation/)
- [docker-compose](https://docs.docker.com/compose/) **&gt;=1.6.2**

> For alternative installation methods, such as composer, see the [docs](https://github.com/phundament/docs).

Installation
------------

[](#installation)

[Download](https://github.com/phundament/app/releases) or clone the repository and go to the application directory

```
git clone https://github.com/phundament/app
cd app

```

> Heads up! Phundament features `Makefile` targets for development and continuous integration, type `make help` to see all available targets or `make all` to run installation and setup.

Create environment configuration files

```
cp .env-dist .env
cp docker-compose.override-dist.yml docker-compose.override.yml

```

Start the application stack

```
docker-compose up -d

```

Run setup commands

```
docker-compose run php composer install
docker-compose run php setup.sh

```

After startup is complete, open `http://:40080` to access the application and login with `admin`/`admin`.

Configuration
-------------

[](#configuration)

### Environment overrides - `docker-compose.override.yml`

[](#environment-overrides---docker-composeoverrideyml)

- host-volumes for local development
- port mappings

### Environment defaults - `docker-compose.yml`

[](#environment-defaults---docker-composeyml)

You can override any ENV variable in `.env` within a `docker-compose.yml` file.

- `VIRTUAL_HOST` `~^myapp\.` Virtual-host configuration for reverse proxy, adjust the virtual host parameter for web application, we'll use it later to easily access the web-server through a wildcard DNS.

### Application defaults - `.env`

[](#application-defaults---env)

During development, it is recommended to change application configuration in the `.env` file, since it does not require restarting the containers.

*Application*

- `APP_NAME` unique application and container identifier *\[a-z0-9\]*
- `APP_TITLE` display name of the application
- `APP_LANGUAGES` available languages for URL manager (eg. `en,de`)
- `APP_ADMIN_EMAIL` e-mail address of application admin user (default in `./yii app/create-admin-user`)
- `APP_ADMIN_PASSWORD` password of application admin user (default in `./yii app/create-admin-user`)
- `APP_MIGRATION_LOOKUP` comma separated list of Yii aliases to look for database migrations, eg. `@app/migrations/data`
- `APP_CONFIG_FILE` custom configuration file to load
- `APP_COOKIE_VALIDATION_KEY` unique and random string to prevent XSS
- `APP_PRETTY_URLS` enable or disable nice URLs, allowed values `1` (yes) or `0` (no)
- `APP_ASSET_FORCE_PUBLISH` force asset publishing after any changes to asset files. **Note!** This may degrade performance, use *only during development*.

*Framework*

- `YII_DEBUG` wheter to enable more verbose application output, eg. on PHP exceptions.
- `YII_ENV` Yii application mode, allowed values `dev`, `prod` or `test`
- `YII_TRACE_LEVEL` amount of caller levels to display for logging.

*Database*

- `DB_ENV_MYSQL_ROOT_USER` user to create databases
- `DB_ENV_MYSQL_ROOT_PASSWORD` root password, eg. set from `"${DB_ENV_MARIADB_PASS}"`
- `DB_ENV_MYSQL_DATABASE` database name
- `DB_ENV_MYSQL_PASSWORD` database password
- `DB_ENV_MYSQL_USER` database user
- `DB_PORT_3306_TCP_ADDR` database hostname
- `DB_PORT_3306_TCP_PORT` database port
- `DATABASE_TABLE_PREFIX` table prefix for default database connection

### Application configuration - `config/main.php`

[](#application-configuration---configmainphp)

For details of available application configuration, please refer to the Yii 2.0 Framework Definitive Guide.

### Settings

[](#settings)

Web UI for application wide key-value store.

- **`pages` Sitemap**
- `availableRoutes`
- **`schmunk42.markdocs` Markdown**
- `markdownUrl` URL or local path for markdown eg. `https://raw.githubusercontent.com/phundament/docs/master`
- `defaultIndexFile` eg. `1-introduction/about.md`
- **`cms.assets` Assets/LESS**
- `useDbAsset` boolean

### Users &amp; permissions

[](#users--permissions)

#### Default users

[](#default-users)

- `admin`

#### Default roles

[](#default-roles)

- `Editor`
- `Public`

💡 To enable public access you need to assign permissions, like `app_site`, `docs_default`, to the `Public` role.

Testing
-------

[](#testing)

First, build your application image

```
docker-compose build

```

Set environment variables for test stack

```
export COMPOSE_PROJECT_NAME=testapp
export BUILD_PREFIX=app

```

Start test stack and enter tester CLI container

```
docker-compose -f docker-compose.yml -f build/compose/test.override.yml up -d
docker-compose -f docker-compose.yml -f build/compose/test.override.yml run tester bash

```

Setup application *(container bash)*

```
$ setup.sh

```

Run test suites *(container bash)*

```
$ codecept run functional prod
$ codecept run acceptance prod

```

> ℹ️ `YII_ENV` must be set to `test` when running codeception.

Deployment
----------

[](#deployment)

Required variables for building &amp; pushing docker images.

- `REGISTRY_USER`
- `REGISTRY_PASS`
- `REGISTRY_HOST`
- `IMAGE_NAME`

Links
-----

[](#links)

- [Documentation](https://github.com/phundament/docs)
- [Project Source-Code](https://github.com/phundament/app)
- [Website](http://phundament.com)
- [Team](https://github.com/orgs/phundament/teams)
- [Imprint](http://herzogkommunikation.de/de/impressum-7.html)
- Version [![Latest Stable Version](https://camo.githubusercontent.com/f6d5430e2f34c46b0c02049bf4262317bbb132715619c4aa597bbc7af01de540/68747470733a2f2f706f7365722e707567782e6f72672f7068756e64616d656e742f6170702f762f737461626c652e706e67)](https://packagist.org/packages/phundament/app)
- Packagist [![Total Downloads](https://camo.githubusercontent.com/be949fe3f4ad244066e56de1e361b4a3627ddca25fb90213e4c09645336aa151/68747470733a2f2f706f7365722e707567782e6f72672f7068756e64616d656e742f6170702f646f776e6c6f6164732e706e67)](https://packagist.org/packages/phundament/app)
- GitLab CI [![build status](https://camo.githubusercontent.com/223efffcf58e838a288c9c111a65b6325d8b969654740330d415d2e52334140e/68747470733a2f2f6769742e68727a672e64652f7068756e64616d656e742f6170702f6261646765732f6d61737465722f6275696c642e737667)](https://git.hrzg.de/phundament/app/builds?scope=all)
- Travis CI [![Build Status](https://camo.githubusercontent.com/60580a5f77cec070ecd8c8c598a1d24cce602bef02fa755def73471283a66dd1/68747470733a2f2f7472617669732d63692e6f72672f7068756e64616d656e742f6170702e7376673f6272616e63683d342e30)](https://travis-ci.org/phundament/app)

---

Built by [\*dmstr](http://diemeisterei.de), Stuttgart 🇩🇪

###  Health Score

45

—

FairBetter than 92% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity41

Moderate usage in the ecosystem

Community33

Small or concentrated contributor base

Maturity79

Established project with proven stability

 Bus Factor1

Top contributor holds 82.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~20 days

Recently: every ~118 days

Total

96

Last Release

3182d ago

Major Versions

0.22.0 → 3.0.232014-03-21

3.0.24 → 4.0.0-alpha12014-08-22

PHP version history (3 changes)0.1PHP &gt;=5.3.2

0.1.3PHP 5.\*

4.0.0-alpha1PHP &gt;=5.4.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/3b4ab2b6685ec71887908ec8cff261a16cd5bb24c69bb8ab52840e220f175f9d?d=identicon)[schmunk](/maintainers/schmunk)

---

Top Contributors

[![schmunk42](https://avatars.githubusercontent.com/u/649031?v=4)](https://github.com/schmunk42 "schmunk42 (1963 commits)")[![samdark](https://avatars.githubusercontent.com/u/47294?v=4)](https://github.com/samdark "samdark (157 commits)")[![qiangxue](https://avatars.githubusercontent.com/u/993322?v=4)](https://github.com/qiangxue "qiangxue (100 commits)")[![cebe](https://avatars.githubusercontent.com/u/189796?v=4)](https://github.com/cebe "cebe (30 commits)")[![Ragazzo](https://avatars.githubusercontent.com/u/1748844?v=4)](https://github.com/Ragazzo "Ragazzo (24 commits)")[![motin](https://avatars.githubusercontent.com/u/793037?v=4)](https://github.com/motin "motin (18 commits)")[![creocoder](https://avatars.githubusercontent.com/u/896494?v=4)](https://github.com/creocoder "creocoder (17 commits)")[![kartik-v](https://avatars.githubusercontent.com/u/3592619?v=4)](https://github.com/kartik-v "kartik-v (11 commits)")[![disco-tex77](https://avatars.githubusercontent.com/u/715173?v=4)](https://github.com/disco-tex77 "disco-tex77 (9 commits)")[![marc7000](https://avatars.githubusercontent.com/u/1118837?v=4)](https://github.com/marc7000 "marc7000 (5 commits)")[![Jasrags](https://avatars.githubusercontent.com/u/131606?v=4)](https://github.com/Jasrags "Jasrags (5 commits)")[![slavcodev](https://avatars.githubusercontent.com/u/757721?v=4)](https://github.com/slavcodev "slavcodev (5 commits)")[![mohorev](https://avatars.githubusercontent.com/u/4974062?v=4)](https://github.com/mohorev "mohorev (4 commits)")[![cornernote](https://avatars.githubusercontent.com/u/51875?v=4)](https://github.com/cornernote "cornernote (4 commits)")[![resurtm](https://avatars.githubusercontent.com/u/100198?v=4)](https://github.com/resurtm "resurtm (4 commits)")[![kumorig](https://avatars.githubusercontent.com/u/5523938?v=4)](https://github.com/kumorig "kumorig (3 commits)")[![gonimar](https://avatars.githubusercontent.com/u/756571?v=4)](https://github.com/gonimar "gonimar (3 commits)")[![crtlib](https://avatars.githubusercontent.com/u/4428231?v=4)](https://github.com/crtlib "crtlib (3 commits)")[![TriAnMan](https://avatars.githubusercontent.com/u/2266882?v=4)](https://github.com/TriAnMan "TriAnMan (3 commits)")[![klimov-paul](https://avatars.githubusercontent.com/u/1482054?v=4)](https://github.com/klimov-paul "klimov-paul (3 commits)")

---

Tags

frameworktemplatedotenvdockeryii2appboilerplateapplication12factordocker-composephundament

### Embed Badge

![Health badge](/badges/phundament-app/health.svg)

```
[![Health](https://phpackages.com/badges/phundament-app/health.svg)](https://phpackages.com/packages/phundament-app)
```

###  Alternatives

[skeeks/cms

SkeekS CMS — control panel and tools based on php framework Yii2

13825.6k47](/packages/skeeks-cms)[yiisoft/yii2-app-benchmark

Yii 2 Benchmark Application

241.0k](/packages/yiisoft-yii2-app-benchmark)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
