Code Monkey home page Code Monkey logo

yii2-docker-enviroment's Introduction

Yii 2 Docker Enviroment(with php_rdkafka && redis-server)

  1. Clone/Upload

    For install advanced Yii2 application edit docker-compose.yml

        - ./docker/nginx/conf.d:/etc/nginx/conf.d # - advanced
        #- ./docker/nginx/conf.dbasic:/etc/nginx/conf.d # - basic
    

    For install basic Yii2 application edit docker-compose.yml

        #- ./docker/nginx/conf.d:/etc/nginx/conf.d # - advanced
        - ./docker/nginx/conf.dbasic:/etc/nginx/conf.d # - basic   
    

    Uncomment the version you need

        php:
          build:
            #context: ./docker/php/build/7.0
            context: ./docker/php/build/7.1
            #context: ./docker/php/build/5.6
    
  2. Run #docker-compose up -d --build and wait until the deploy is complete

    Params for connect to service

    Mysql:

        host:        172.18.33.2
        port:        3306
        user:        root
        password:    12345
        database:    test
    

    Redis:

        host:        172.18.33.3
        port:        6379
        password:    123456
        database:    from 1 to 16
    
  3. Enter in php container

     docker exec -it php bash
    
  4. For install advanced Yii2 application run in container

     composer create-project --prefer-dist yiisoft/yii2-app-advanced ./
     
     php init
    

    For install basic Yii2 application run in container

    composer create-project --prefer-dist yiisoft/yii2-app-basic ./
    
  5. Wait until the composer finishes

  6. Configure Yii2 application and run

    php yii migrate/up
    
  7. The application is available at

    http://mysite.local
    

yii2-docker-enviroment's People

Contributors

desure85 avatar

Stargazers

 avatar

Watchers

 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.