Giter Club home page Giter Club logo

php81-nginx-mariadb's Introduction

使用技術

Laravel PHP MariaDB nginx Docker docker-compose

Laravelプロジェクトの作成方法

  1. cloneする。
    プロジェクトのコピーを自分のコンピュータにダウンロードします。

    git clone https://github.com/sho55/php81-nginx-mariadb.git 
    
  2. docker composeで立ち上げる。
    ダウンロードしたプロジェクトを使って、必要なプログラム(コンテナと呼ばれる)を自動的に起動します。

    cd php81-nginx-mariadb
    docker compose up -d
    
  3. phpコンテナに入る
    起動したプログラムの中の一つ、PHPを使う部分にアクセスします。

    docker exec -it myapp-php bash
    
  4. laravelをインストール
    PHPを使って、Laravelというツールをセットアップ(インストール)します。

    composer create-project --prefer-dist laravel/laravel my-app
    
  5. phpコンテナから出る
    Laravelのセットアップが終わったら、PHPの部分を終了します。

    exit
    
  6. docker-compose.ymlを編集する
    設定ファイル(docker-compose.yml)を変更して、プロジェクトの設定を更新します。以下のようにvolumesセクションを編集してください。

      web: 
     
        volumes:
        - - .:/var/www/
        + - ./my-app:/var/www/
    
      nginx: 
     
        volumes:
        - - .:/var/www/
        + - ./my-app:/var/www/
     
    
  7. 再度docker composeで立ち上げる
    更新した設定で、もう一度プログラムを起動します。

    docker compose up -d
    

php81-nginx-mariadb's People

Contributors

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