Giter VIP home page Giter VIP logo

twitter-clone's Introduction

twitter-cloneの環境構築

Dockerをインストール

こちらからDocker Desktop on Macをインストールします。 ※ M1MacやM2Macだったら、Docker Desktop for Mac with Apple siliconの方をインストールします。

インストールできたら、Docker Desktop on Macを起動します。

環境構築

 $ forkして自分のアカウントのリポジトリにコピーします.
    github上でforkボタンを押して、フォークしてください。 
 $ git clone [email protected]:[自分のアカウント名]/twitter-clone.git
 $ cd twitter
 $ cp .env.example .env

Docker で環境を立ち上げる

  // docker-compose.ymlファイルのある階層に移動します。
  $ docker-compose build
  $ docker-compose up -d

色々インストールする

  $ docker exec -it twitter-clone-app-1 /bin/bash
  $ composer install
  $ npm install

これで、一通りの環境が立ち上がります。

http://localhost:8083/でLaravelが立ち上がります。

docker container は次の 3 つが立ち上がります。

コンテナ名 メモ
twitter-clone-app-1 アプリケーションのコンテナです。
コンテナに入れば php artisan コマンドが使えます。
twitter-clone-db-1 Mysql のインスタンス。
コンテナに入ればMysqlコマンドを使えます。
twitter-clone-nginx-1 Nginx のインスタンス。

Dockerのコマンド集

コマンド 説明
docker-compose build 各コンテナのDockerfileに従ってDocker イメージがビルドされます。
docker-compose up -d 各コンテナを起動するコマンドです。
docker-compose down コンテナを停止するコマンドです。
docker exec -it twitter-clone-app-1 /bin/bash appコンテナに入る

twitter-clone's People

Contributors

keeee21 avatar

Watchers

 avatar

twitter-clone's Issues

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.