Code Monkey home page Code Monkey logo

yii2-docker-app-advanced's Introduction

Docker-compose config for Yii 2 Advanced Project Template

Yii 2 docker is a configuration for easy deployment and development of Yii 2 Advanced Project Template.

REQUIREMENTS

INSTALLATION VIA COMPOSER

composer create-project --prefer-dist --no-install consultnn/yii2-docker-app-advanced app

FAST INSTALLATION

git clone --depth=1 https://github.com/consultnn/yii2-docker-app-advanced.git app \
&& cd app \
&& rm -rf .git \
&& git clone --depth=1 [email protected]:yiisoft/yii2-app-advanced.git project \
&& cd project \
&& rm -rf .git \
&& sudo chown -R $USER:$USER project

MANUAL INSTALLATION

Clone this repository

git clone --depth=1 https://github.com/consultnn/yii2-docker-app-advanced.git app

Change directory

cd app

Remove git directory

rm -rf .git

Install Yii 2 Advanced Project Template via composer inside docker container

git clone --depth=1 [email protected]:yiisoft/yii2-app-advanced.git project

Remove git directory

rm -rf .git

Change project directory owner (default root, because process inside container run as root)

sudo chown -R $USER:$USER project

Add own github token in ./docker/php/auth.json

DIRECTORY STRUCTURE

docker                          contains docker configurations, build files and logs
    nginx                       nginx docker configuration
    php                         php docker configuration
    mongo                       mongodb docker configuration
project                         Yii 2 Advanced Project Template
docker-compose.yml              docker-compose configuration
production-compose.yml          docker-compose configuration for production env
common-compose.yml              common docker-compose configuration

USAGE

To execute commands inside docker container run

docker-compose run --rm {service} {command}
or, if application already running
docker exec {service} {command}

For example:

docker-compose run php composer install
docker exec run php /init

Start docker containers

docker-compose up -d

NOTE: git isn't installed in php container, so use --prefer-dist composer option NOTE: default directory inside php container - "/project"

After start check http://127.0.0.1:8090

yii2-docker-app-advanced's People

Contributors

serieznyi avatar sokrat 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.