Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save decodedmrq/246f538cf23149013cf32e46e148d223 to your computer and use it in GitHub Desktop.

Select an option

Save decodedmrq/246f538cf23149013cf32e46e148d223 to your computer and use it in GitHub Desktop.

Revisions

  1. @wataridori wataridori revised this gist Oct 7, 2016. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions laravel-quickstart-project-docker.md
    Original file line number Diff line number Diff line change
    @@ -48,11 +48,11 @@ docker-compose up -d
    // Run the following command to check docker status
    docker ps
    ```
    - Enter workspace container and run php command
    - Enter workspace container and run php commands (run **only once** when initialize the project)
    ```
    docker exec -it project_workspace bash
    composer install
    php artisan migrate
    ```
    - Enjoy the project at http://localhost:8000/
    - To stop project, use `docker-compose down`. To start project, use `docker-compose up -d`
  2. @wataridori wataridori revised this gist Sep 15, 2016. 1 changed file with 2 additions and 5 deletions.
    7 changes: 2 additions & 5 deletions laravel-quickstart-project-docker.md
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,7 @@
    - Install Docker
    - Docker for Ubuntu: https://docs.docker.com/engine/installation/linux/ubuntulinux/
    ```
    sudo apt-get update
    sudo apt-get install apt-transport-https ca-certificates
    sudo apt-get update && apt-get install -y apt-transport-https ca-certificates
    sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
    // Open the /etc/apt/sources.list.d/docker.list and add the following line then save it
    @@ -11,9 +10,7 @@
    // Ubuntu 16.04
    deb https://apt.dockerproject.org/repo ubuntu-xenial main
    sudo apt-get update && apt-cache policy docker-engine
    sudo apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual
    sudo apt-get install docker-engine
    sudo apt-get update && apt-cache policy docker-engine && apt-get install - y linux-image-extra-$(uname -r) linux-image-extra-virtual apt-get install docker-engine
    sudo service docker start
    sudo groupadd docker
    sudo usermod -aG docker $USER
  3. @wataridori wataridori revised this gist Sep 15, 2016. 1 changed file with 19 additions and 0 deletions.
    19 changes: 19 additions & 0 deletions laravel-quickstart-project-docker.md
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,24 @@
    - Install Docker
    - Docker for Ubuntu: https://docs.docker.com/engine/installation/linux/ubuntulinux/
    ```
    sudo apt-get update
    sudo apt-get install apt-transport-https ca-certificates
    sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
    // Open the /etc/apt/sources.list.d/docker.list and add the following line then save it
    // Ubuntu 14.04
    deb https://apt.dockerproject.org/repo ubuntu-trusty main
    // Ubuntu 16.04
    deb https://apt.dockerproject.org/repo ubuntu-xenial main
    sudo apt-get update && apt-cache policy docker-engine
    sudo apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual
    sudo apt-get install docker-engine
    sudo service docker start
    sudo groupadd docker
    sudo usermod -aG docker $USER
    ```
    - Docker for Mac: https://docs.docker.com/docker-for-mac/#/download-docker-for-mac
    - Visit https://github.com/FramgiaDockerTeam/laravel-microservices for other information
    - Clone Laravel Quick Start Project at https://github.com/laravel/quickstart-basic
  4. @wataridori wataridori revised this gist Sep 15, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion laravel-quickstart-project-docker.md
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    - Install Docker
    - Docker for Ubuntu: https://docs.docker.com/engine/installation/linux/ubuntulinux/
    - Docker for Mac: https://docs.docker.com/docker-for-mac/#/download-docker-for-mac
    - Visit https://github.com/FramgiaDockerTeam/laravel-microservices to other information
    - Visit https://github.com/FramgiaDockerTeam/laravel-microservices for other information
    - Clone Laravel Quick Start Project at https://github.com/laravel/quickstart-basic
    ```
    git clone [email protected]:laravel/quickstart-basic.git
  5. @wataridori wataridori revised this gist Sep 15, 2016. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions laravel-quickstart-project-docker.md
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,6 @@
    - Install Docker
    - Docker for Ubuntu: https://docs.docker.com/engine/installation/linux/ubuntulinux/
    - Docker for Mac: https://docs.docker.com/docker-for-mac/#/download-docker-for-mac
    - Visit https://github.com/FramgiaDockerTeam/laravel-microservices to other information
    - Clone Laravel Quick Start Project at https://github.com/laravel/quickstart-basic
    ```
  6. @wataridori wataridori renamed this gist Sep 15, 2016. 1 changed file with 0 additions and 0 deletions.
  7. @wataridori wataridori created this gist Sep 15, 2016.
    39 changes: 39 additions & 0 deletions laravel-quickstart-project-docker
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,39 @@
    - Visit https://github.com/FramgiaDockerTeam/laravel-microservices to other information
    - Clone Laravel Quick Start Project at https://github.com/laravel/quickstart-basic
    ```
    git clone [email protected]:laravel/quickstart-basic.git
    ```
    - Move to the project folder and creat a file named `docker-compose.yml`. Copy data from https://github.com/FramgiaDockerTeam/laravel-microservices/blob/master/docker-compose.yml into that file.
    ```
    cd quickstart-basic
    // You can download docker-compose.yml file using wget command
    wget https://raw.githubusercontent.com/FramgiaDockerTeam/laravel-microservices/master/docker-compose.yml
    ```
    - Open `.env` file and change the `DB_HOST` and `REDIS_HOST`
    ```
    ...
    // DB_HOST=127.0.0.1
    DB_HOST=mysql
    ...
    // REDIS_HOST=127.0.0.1
    REDIS_HOST=redis
    ```
    - `chmod` folder `storage` and `bootstrap/cache`
    ```
    chmod -R 777 storage
    chmod -R 777 bootstrap/cache
    ```
    - Run docker and wait for about one minute
    ```
    docker-compose up -d
    // Run the following command to check docker status
    docker ps
    ```
    - Enter workspace container and run php command
    ```
    docker exec -it project_workspace bash
    composer install
    php artisan migrate
    ```
    - Enjoy the project at http://localhost:8000/