Giter Site home page Giter Site logo

laravel-sail-example's Introduction

laravel sailを使った環境構築のメモ

環境情報

wslは規定としてUbuntu20.04を設定している状態

> wsl -l -v
  NAME                   STATE           VERSION
* Ubuntu-20.04           Running         2

> docker --version
Docker version 20.10.8, build 3967b7d

WindowsのバージョンはWindows 10 Home
DockerDesktopのバージョンは4.4.1

laravel-sailのプロジェクト作成、Gitにコミット&プッシュ

VSCodeのターミナル(cmd)で以下作業
curl~~のコマンドの途中でwslで紐づくUbuntu環境のrootパスワードを入力

> wsl
$ cd /mnt/c/workspace_git/
$ curl -s https://laravel.build/laravel-sail-example | bash
$ cd laravel-sail-example
$ ./vendor/bin/sail up -d

> git init
> git add -A
> git commit -m "first commit"
> git branch -M master
> git remote add origin https://github.com/imo-tikuwa/laravel-sail-example.git
> git push -u origin master

プロジェクト作成者以外(開発者)の環境構築手順

> cd /D c:/workspace_git
> git clone https://github.com/imo-tikuwa/laravel-sail-example.git
> cd laravel-sail-example
> composer install
> cp .env.example .env
> php artisan key:generate
> wsl
$ cd /mnt/c/workspace_git/laravel-sail-example
$ vendor/bin/sail up -d

sailのエイリアス設定について

  • wslでUbuntu-20.04を使ってるのであれば.bash_aliasesにsailのエイリアスを作ると良さげ
    • /home/[ユーザー名]直下の.bashrc.bash_aliasesがあれば読み込むっていう記述がある
    • .bash_aliasesを作成し、以下追加
      alias sail='./vendor/bin/sail'
      
    • 他のOSも同じような感じで設定できるはず

laravel-sail-example's People

Contributors

imo-tikuwa 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.