Coder Social home page Coder Social logo

dportalesr / app Goto Github PK

View Code? Open in Web Editor NEW

This project forked from phundament/app

1.0 1.0 0.0 9.14 MB

12factor PHP Application Template for Yii 2.0 Framework

Home Page: http://phundament.com

License: Other

Makefile 0.37% Shell 0.61% PHP 57.39% CSS 41.15% JavaScript 0.20% Batchfile 0.28%

app's Introduction

Phundament 4

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

Quick-Start

Clone the repository and go to the application directory

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

Create environment configuration file

cd app
cp .env-dist .env

Inititalize the application

docker-compose run appcli composer install
docker-compose run appcli ./yii app/create-mysql-db
docker-compose run appcli ./yii migrate
docker-compose run appcli ./yii app/setup-admin-user

For alternative installation methods see the docs.

Make the application stack

docker-compose up -d

Find the port for the application nginx service

docker-compose port web 80

And open the application in your browser.

List all services

docker-compose ps

Show and follow logs

docker-compose logs

Configuration

Environment - docker-compose.yml

  • 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.

Environment defaults - .env

Identifier

  • APP_NS namespace for the application, used i.e. for Docker image tags [a-z0-9]
  • APP_ID unique application and container identifier [a-z0-9]
  • APP_NAME display name of the application

Application

  • APP_MIGRATION_LOOKUP comma separated list of Yii aliases to look for database migrations, eg. @app/migrations/data
  • APP_ADMIN_EMAIL e-mail address of application admin user
  • APP_ADMIN_PASSWORD password of application admin user
  • APP_SUPPORT_EMAIL e-mail address for the application eg. [email protected]
  • 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)

Application development settings

  • APP_ASSET_FORCE_PUBLISH force asset publishing after any changes to asset files. Note! This may degrade performance or cause permission issues, depending on your setup.

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_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

PHP Application settings - config/main.php

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

Demo

A demo can be found at the Phundament Playground Application Demo! You can get the source-code of the demo application from its GitHub repository.

Deploy to Tutum

Resources

app's People

Contributors

schmunk42 avatar samdark avatar qiangxue avatar cebe avatar ragazzo avatar motin avatar creocoder avatar kartik-v avatar disco-tex77 avatar slavcodev avatar marc7000 avatar jasrags avatar cornernote avatar mohorev avatar resurtm avatar trianman avatar klimov-paul avatar crtlib avatar kumorig avatar gonimar avatar pat812 avatar lancecoder avatar uldisn avatar suralc avatar lucianobaraglia avatar igorsantos07 avatar dletz avatar drsdre avatar sdkiller avatar sonicgd avatar

Stargazers

Roman avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.