2017 © Pedro Peláez
 

project yii2-base-project

A Yii 2 Base Project Template

image

cottacush/yii2-base-project

A Yii 2 Base Project Template

  • Wednesday, February 7, 2018
  • by goke-epapa
  • Repository
  • 11 Watchers
  • 4 Stars
  • 38 Installations
  • CSS
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 17 Versions
  • 3 % Grown

The README.md

Yii2 Base Project

A Yii 2 Base Project Template, (*1)

Latest Stable Version Total Downloads License, (*2)

Features, (*3)

  • Yii framework as the PHP MVC framework., (*4)

  • Security - It sets some headers that projects applications against click-jacking and XSS., (*5)

  • Assets version - This fixes issue with updates to js and css files and cached browser files., (*6)

  • New Relic - Ensures that the proper routes show up in the new relic monitoring dashboard., (*7)

  • Continuous Integration - Sample ant build.xml file that can be easily modified., (*8)

Requirements

The minimum requirement by this project template that your Web server supports PHP 8.0., (*9)

Install via Composer

If you do not have Composer, you may install it by following the instructions at getcomposer.org., (*10)

You can then install this project template using the following command:, (*11)

composer global require "fxp/composer-asset-plugin:~1.4"
composer create-project --prefer-dist cottacush/yii2-base-project new_project

Virtual Host Setup

Windows Link 1 Link 2, (*12)

Mac Link 1 Link 2, (*13)

Debian Linux Link 1 Link 2, (*14)

Sample Virtual Host Config for Apache, (*15)

<VirtualHost *:80>
    ServerAdmin admin@example.com
    DocumentRoot "<WebServer Root Dir>/yii2-base-project/app/web"
    ServerName local.yii2-base-template.com
    <Directory <WebServer Root Dir>/yii2-base-project/app/web>
       AllowOverride all
       Options -MultiViews
      Require all granted
    </Directory>
</VirtualHost>

Build

Dependencies, (*16)

Run build, (*17)

ant

Environment Variables

Make a copy of .env.sample to .env in the env directory., (*18)

Docker

This project is dockerized using the LEMP stack. The stack consists of: - PHP 8 - nginx, (*19)

Inspired by yii2-dockerized, (*20)

Installation

Mac Windows Ubuntu, (*21)

Running Containers

  • Ensure docker is running
  • Change directory to project directory
  • Run the command docker-compose up
  • To rebuild the containers after updates to docker config files, run docker-compose up --build

Entering Container CLI

  • Run the command docker ps
  • Check the Container ID for container with image ending with "_web"
  • Run the command docker exec -it [container_id] bash

Change log

Please see CHANGELOG for more information what has changed recently., (*22)

Security

If you discover any security related issues, please email developers@cottacush.com instead of using the issue tracker., (*23)

Credits

License

The MIT License (MIT). Please see License File for more information., (*24)

The Versions