🐳 Build a simple laravel development environment with docker-compose.

Overview

docker-laravel 🐳

License Stars Issues Forks

Introduction

Build a simple laravel development environment with docker-compose.

Usage

$ git clone [email protected]:ucan-lab/docker-laravel.git
$ cd docker-laravel
$ make create-project # Install the latest Laravel project
$ make install-recommend-packages # Optional

http://localhost

Tips

Container structures

├── app
├── web
└── db

app container

web container

  • Base image

db container

Comments
  • URL query strings not working

    URL query strings not working

    環境構築に利用させて頂いてます。ありがとうございます。 利用していたところ、Laravel側でURLクエリが取得できませんでした。

    https://github.com/ucan-lab/docker-laravel/blob/master/infrastructure/docker/nginx/default.conf#L13

    ↑ 以下に変更すればうまく動きましたー try_files $uri $uri/ /index.php?$query_string

    opened by ueda222koban 8
  • Error response from daemon: invalid mount config for type

    Error response from daemon: invalid mount config for type "bind": bind source path does not exist: ./src

    Hi there, I am using this on popOs 22.04, and it doesn't seem to work.

    I get this error when I run "make up"

    Error response from daemon: invalid mount config for type "bind": bind source path does not exist: ./src make: *** [Makefile:2: up] Error 1

    opened by firecentaur 5
  • Review directory structure

    Review directory structure

    #78

    $ git clone [email protected]:ucan-lab/docker-laravel.git
    $ cd docker-laravel
    
    $ git switch feature/issue-78
    
    $ make create-project
    $ make install-recommend-packages
    

    http://127.0.0.1

    opened by ucan-lab 3
  • Update nginx Docker tag to v1.23

    Update nginx Docker tag to v1.23

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | nginx | final | minor | 1.22 -> 1.23 |


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 2
  • Update dependency nginx to v1.21

    Update dependency nginx to v1.21

    WhiteSource Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | nginx | final | minor | 1.20 -> 1.21 |


    Configuration

    📅 Schedule: At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by WhiteSource Renovate. View repository job log here.

    opened by renovate[bot] 2
  • docker-laravel/infra/docker/nginx/default.confの設定変更が反映されない

    docker-laravel/infra/docker/nginx/default.confの設定変更が反映されない

    はじめまして。私は現在、Laravelを用いて画像ファイルを管理するアプリを作成しています。 NGINXの初期設定では1MB以上のファイルを送信することができません。このままだとHTMLのフォームから画像をアップロードするには都合が悪いので、アップロードできるファイルサイズの上限が10MBになるように、NGINXのdefault.confを変更しました。

    server {
        # この1行を追加
        client_max_body_size 10M;
        ...
    }
    

    しかしながら、NGINXを再起動し、加えて念のためにartisan config:cacheを実行しても、ファイルサイズの上限がデフォルト値の1MBから変わっていないようです。 NGINXの再起動がうまく行っていないのかと思い、様々な方法(以下を参照ください)を試したものの、やはり設定が適用されず困っております。 お忙しいところ恐れ入りますが、何か解決策があれば何卒よろしく御願い致します。

    # 方法1:コマンド
    docker kill --signal=SIGHUP docker-laravel_web_1
    
    # 方法1:ログ
    2021/07/03 15:34:26 [notice] 1#1: signal 17 (SIGCHLD) received from 70
    2021/07/03 15:34:26 [notice] 1#1: worker process 70 exited with code 0
    2021/07/03 15:34:26 [notice] 1#1: signal 29 (SIGIO) received
    2021/07/03 15:34:26 [notice] 1#1: signal 17 (SIGCHLD) received from 69
    2021/07/03 15:34:26 [notice] 1#1: worker process 68 exited with code 0
    2021/07/03 15:34:26 [notice] 1#1: worker process 69 exited with code 0
    2021/07/03 15:34:26 [notice] 1#1: worker process 71 exited with code 0
    2021/07/03 15:34:26 [notice] 1#1: signal 29 (SIGIO) received
    2021/07/03 15:34:26 [notice] 1#1: signal 17 (SIGCHLD) received from 68
    
    # 方法2:コマンド
    docker exec docker-laravel_web_1 nginx -s reload
    
    # 方法2:ログ
    2021/07/03 15:36:55 [notice] 76#76: signal process started
    
    question 
    opened by ohkaito 2
  • phpのDockerfileについてです。

    phpのDockerfileについてです。

    すみません。PHPの初心者で学習中の者です。こちらのqiitaで大変勉強になりいつも有難う御座います。

    ただ今貴方様のこちらのDocker-laravelのファイルを参考にして独学でPHPを勉強しようと, macにphp7.4-fpm-buster+nginx+mysql8+phpmyadmin/phpmyadminで構築して”いちばんやさしいPHPの教本”を勉強しました。 他の目的に近い参考にしたサイトです。 https://php-archive.net/php/docker-php-environment/ https://qiita.com/nemui_/items/f911be7ffa4f29293fd5, etc..

    殆どのサイト通りは全く構築出来ませんでしたが貴方様のDocker-laravelのphpの設定Dockerfileで構築出来ました。深く感謝したします。

    前書き長く申し訳ありません。以前数週間前の貴方様のphpの設定ファイルのDockerfileの記述で、

    PHP のDockerfile構成

    FROM php:7.4-fpm-buster
    
    SHELL ["/bin/bash", "-oeux", "pipefail", "-c"]
    ENV TZ=UTC \
        # locale
        LANG=en_US.UTF-8 \
        LANGUAGE=en_US:en \
        LC_ALL=en_US.UTF-8 \
        # composer environment
        COMPOSER_ALLOW_SUPERUSER=1 \
        COMPOSER_HOME=/composer 
    
    COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
    
    RUN apt-get update && \
        apt-get -y install git libicu-dev libonig-dev libzip-dev unzip locales && \
        apt-get clean && \
        rm -rf /var/lib/apt/lists/* && \
        locale-gen en_US.UTF-8 && \
        localedef -f UTF-8 -i en_US en_US.UTF-8 && \
        mkdir /var/run/php-fpm && \
        mkdir(--こちらに書いてあった記述を教えて下さい--)
        docker-php-ext-install intl pdo_mysql mbstring zip bcmath && \
        composer config -g process-timeout 3600 && \
        composer config -g repos.packagist composer https://packagist.jp && \
        composer global require hirak/prestissimo
    
    COPY php.ini /usr/local/etc/php/
    
    

    **以前に mkdir /var/run/php-fpm && \

    の下にもう一つ

    `mkdir ~~`

    の記述で稼動できました。** こちらの記述を覚えていらっしゃいますか??お忙しいところ恐れ入りますが何卒よろしく御願い致します。m(_ _)m 佐藤秀人

    question 
    opened by hs745 2
  • please meilisearch container

    please meilisearch container

    append

    volumes:
      meili-store:
    
      meilisearch:
        image: getmeili/meilisearch:v0.29
        ports:
          - target: 7700
            published: ${MEILISEARCH_PUBLISHED_PORT:-7700}
            protocol: tcp
            mode: host
        environment:
          - MEILI_MASTER_KEY=MY_API_KEY
        volumes:
          - type: volume
            source: meili-store
            target: /var/lib/meili-store
            volume:
              nocopy: true
    
    
    opened by vahidalvandi 1
  • please update https://github.com/ucan-lab/docker-laravel/wiki/Add-Redis-Container

    please update https://github.com/ucan-lab/docker-laravel/wiki/Add-Redis-Container

    change docker-compose exec redis redis-cli to docker compose exec redis redis-cli

    aslo please help me , i have ubuntu after run command RUN docker-php-ext-install redis it return RUN: command not found

    opened by vahidalvandi 1
  • Update dependency nginx to v1.23

    Update dependency nginx to v1.23

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | nginx | final | minor | 1.22 -> 1.23 |


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 1
  • how to run composer update?

    how to run composer update?

    Hi there,

    I am trying to add another dependency via composer. However, I get a strange error:

    `$ docker compose exec app composer update
    Loading composer repositories with package information Updating dependencies Your requirements could not be resolved to an installable set of packages.

    Problem 1 - laravel/laravel is present at version 1.0.0+no-version-set and cannot be modified by Composer - roave/security-advisories dev-master conflicts with laravel/laravel <=9.1.8. - Root composer.json requires roave/security-advisories dev-master -> satisfiable by roave/security-advisories[dev-master]. `

    opened by firecentaur 1
  • chore(deps): update composer docker tag to v2.5

    chore(deps): update composer docker tag to v2.5

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | composer | final | minor | 2.4 -> 2.5 |


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 0
  • chore(deps): update nginx docker tag to v1.23

    chore(deps): update nginx docker tag to v1.23

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | nginx | final | minor | 1.22 -> 1.23 |


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 0
  • chore(deps): update php docker tag to v8.2

    chore(deps): update php docker tag to v8.2

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | php | stage | minor | 8.1-fpm-bullseye -> 8.2-fpm-bullseye |


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 0
  • Dependency Dashboard

    Dependency Dashboard

    This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

    Open

    These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

    Detected dependencies

    docker-compose
    docker-compose.yml
    dockerfile
    infra/docker/mysql/Dockerfile
    • mysql/mysql-server 8.0
    infra/docker/nginx/Dockerfile
    • nginx 1.22
    infra/docker/php/Dockerfile
    • php 8.1-fpm-bullseye
    • composer 2.4
    github-actions
    .github/workflows/deploy-build-testing.yml
    • actions/checkout v3
    .github/workflows/laravel-create-project.yml
    • actions/checkout v3
    .github/workflows/laravel-git-clone.yml
    • actions/checkout v3

    • [ ] Check this box to trigger a request for Renovate to run again on this repository
    opened by renovate[bot] 0
Releases(v2.2.2)
  • v2.2.2(Sep 18, 2022)

    What's Changed

    • Change working directory to /workspace by @nekohan in https://github.com/ucan-lab/docker-laravel/pull/209

    New Contributors

    • @nekohan made their first contribution in https://github.com/ucan-lab/docker-laravel/pull/209

    Full Changelog: https://github.com/ucan-lab/docker-laravel/compare/v2.2.1...v2.2.2

    Source code(tar.gz)
    Source code(zip)
  • v2.2.1(Sep 3, 2022)

    What's Changed

    • fix make build option by @ucan-lab in https://github.com/ucan-lab/docker-laravel/pull/202
    • Update composer Docker tag to v2.4 by @renovate in https://github.com/ucan-lab/docker-laravel/pull/207

    Full Changelog: https://github.com/ucan-lab/docker-laravel/compare/v2.2.0...v2.2.1

    Source code(tar.gz)
    Source code(zip)
  • v2.2.0(Jul 5, 2022)

    What's Changed

    • Add MailHog container by @ucan-lab in https://github.com/ucan-lab/docker-laravel/pull/194
    • fix Prevent migration of MySQL containers before they start by @ucan-lab in https://github.com/ucan-lab/docker-laravel/pull/195
    • fix allocate TTY by @ucan-lab in https://github.com/ucan-lab/docker-laravel/pull/196
    • Add xdebug extention by @ucan-lab in https://github.com/ucan-lab/docker-laravel/pull/186

    Full Changelog: https://github.com/ucan-lab/docker-laravel/compare/v2.1.2...v2.2.0

    Source code(tar.gz)
    Source code(zip)
  • v2.1.2(May 30, 2022)

    What's Changed

    • Configure Renovate by @renovate in https://github.com/ucan-lab/docker-laravel/pull/187
    • Update dependency composer to v2.3 by @renovate in https://github.com/ucan-lab/docker-laravel/pull/188
    • Update actions/checkout action to v3 by @renovate in https://github.com/ucan-lab/docker-laravel/pull/191
    • Update dependency nginx to v1.22 by @renovate in https://github.com/ucan-lab/docker-laravel/pull/192

    New Contributors

    • @renovate made their first contribution in https://github.com/ucan-lab/docker-laravel/pull/187

    Full Changelog: https://github.com/ucan-lab/docker-laravel/compare/v2.1.1...v2.1.2

    Source code(tar.gz)
    Source code(zip)
  • v2.1.1(Mar 9, 2022)

    What's Changed

    • fix Class "NunoMaduro\Collision\Adapters\Laravel\CollisionServiceProvider" not found by @ucan-lab in https://github.com/ucan-lab/docker-laravel/pull/181
    • refactor clean code by @ucan-lab in https://github.com/ucan-lab/docker-laravel/pull/183
    • fix docker-compose to docker compose by @ucan-lab in https://github.com/ucan-lab/docker-laravel/pull/184

    Full Changelog: https://github.com/ucan-lab/docker-laravel/compare/v2.1.0...v2.1.1

    Source code(tar.gz)
    Source code(zip)
  • v2.1.0(Mar 4, 2022)

    What's Changed

    • Update 2.1 by @ucan-lab in https://github.com/ucan-lab/docker-laravel/pull/178
    • Add .dockerignore build by @ucan-lab in https://github.com/ucan-lab/docker-laravel/pull/175
    • Multi-stage build by @ucan-lab in https://github.com/ucan-lab/docker-laravel/pull/173
    • Maintenance of environment variables by @ucan-lab in https://github.com/ucan-lab/docker-laravel/pull/177

    Full Changelog: https://github.com/ucan-lab/docker-laravel/compare/v2.0.0...v2.1.0

    Source code(tar.gz)
    Source code(zip)
  • v2.0.0(Mar 1, 2022)

    What's Changed

    • Update 2.0 by @ucan-lab in https://github.com/ucan-lab/docker-laravel/pull/172
    • Change directory structure by @ucan-lab in https://github.com/ucan-lab/docker-laravel/pull/151
    • Remove label by @ucan-lab in https://github.com/ucan-lab/docker-laravel/pull/154
    • Add --no-install-recommends option by @ucan-lab in https://github.com/ucan-lab/docker-laravel/pull/155
    • Change unix domain socket to tcp socket by @ucan-lab in https://github.com/ucan-lab/docker-laravel/pull/157
    • Remove Node from web container by @ucan-lab in https://github.com/ucan-lab/docker-laravel/pull/163
    • Remove unnecessary volumes by @ucan-lab in https://github.com/ucan-lab/docker-laravel/pull/165
    • Remove .env.example by @ucan-lab in https://github.com/ucan-lab/docker-laravel/pull/167
    • Change the base image OS of the web container from alpine to debian by @ucan-lab in https://github.com/ucan-lab/docker-laravel/pull/169
    • Remove shell instructions by @ucan-lab in https://github.com/ucan-lab/docker-laravel/pull/171

    Full Changelog: https://github.com/ucan-lab/docker-laravel/compare/v1.0.3...v2.0.0

    Source code(tar.gz)
    Source code(zip)
  • v1.0.3(Feb 27, 2022)

    What's Changed

    • Upgrade Composer version 2.1 to 2.2 by @ucan-lab in https://github.com/ucan-lab/docker-laravel/pull/153
    • Remove fastcgi_index from nginx.conf by @ucan-lab in https://github.com/ucan-lab/docker-laravel/pull/161
    • Listen port settings when IPv6 arrives by @ucan-lab in https://github.com/ucan-lab/docker-laravel/pull/162
    • fix README by @ucan-lab in https://github.com/ucan-lab/docker-laravel/pull/164

    Full Changelog: https://github.com/ucan-lab/docker-laravel/compare/v1.0.2...v1.0.3

    Source code(tar.gz)
    Source code(zip)
  • v1.0.2(Dec 12, 2021)

    What's Changed

    • fix README by @ucan-lab in https://github.com/ucan-lab/docker-laravel/pull/149
    • Upgrade PHP8.1 by @ucan-lab in https://github.com/ucan-lab/docker-laravel/pull/150

    Full Changelog: https://github.com/ucan-lab/docker-laravel/compare/v1.0.1...v1.0.2

    Source code(tar.gz)
    Source code(zip)
  • v1.0.1(Oct 2, 2021)

  • v1.0.0(Jun 12, 2021)

Owner
ucan-lab
Backend Developer at ROLO. I love PHP and I'm focusing on Laravel, Docker, GraphQL.
ucan-lab
A skeleton for build your Kata with Docker

A skeleton for build your Kata with Docker

Raúl Coloma Bonifacio 1 Nov 12, 2021
Simple web app with laravel build from scratch

Find Me Simple Web Application This "Find Me" matchmaking web-based application is useful for facilitating people who are looking for new relationship

Jieyab 15 Nov 26, 2022
An example of Laravel app that runs in a docker container with RoadRunner

This repository contains an example of Laravel (PHP Framework) application that runs in a docker container with RoadRunner (high-performance PHP appli

Paramtamtam 117 Dec 20, 2022
Setup Docker Para Projetos Laravel

Setup Docker Para Projetos Laravel

EspecializaTi 9 Sep 13, 2022
A preconfigured Laravel, React, Typescript, Docker boilerplate to save you time!

Laravel - React - Docker - Boilerplate This repo is built with the following: Laravel 9 React 17 Vite 3 ESLint 8 TypeScript 4.7 Husky/Commit lint PHP

Lockhinator 23 Dec 14, 2022
Reverse proxy skeleton built for docker with traefik, showcasing a Symfony + React application

Decoupled Backend(Symfony) + Frontend(React ts) built with Traefik & Docker Reverse proxy skeleton built for docker with traefik, showcasing a decoupl

Sergiu 1 Dec 13, 2021
Phalcon 3, PHP7, Docker sample starter application

Phalcon Docker Nginx starter app Docker image based on: Ubuntu 16.04 Phalcon 3 PHP 7 Nginx + PHP FPM Supervisord Dependencies Docker. For installation

Guilherme Viebig 25 Oct 7, 2022
a laravel package to create dynamically dashboard views in several templates ( in development)

Laravel Dashboarder A laravel package for generate admin dashboard dynamically based on Tabler template use livewire - alpinejs Installation Run the c

Laravel Iran Community 7 Dec 12, 2022
A Laravel REST API backend with React/Redux, hot module reloading in development and route-level code splitting

React Laravel Boilerplate This is the boilerplate that I personally use for getting projects off the ground quickly using my favourite stack of techno

Carwyn Stephen 174 Jan 6, 2023
Laravel CRUD Generator This Generator package provides various generators like CRUD, API, Controller, Model, Migration, View for your painless development of your applications.

Laravel CRUD Generator This Generator package provides various generators like CRUD, API, Controller, Model, Migration, View for your painless develop

AppzCoder 1.3k Jan 2, 2023
A template for web development using Laravel, Inertia and Svelte

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Atikur Rahman Chitholian 0 Dec 26, 2021
Build and deploy Non-Fungible Algorand Tokens with Laravel & IPFS

Introduction Laravel is a web application framework with an expressive, elegant syntax designed to make developing web apps easier and faster through

Tomas Verhelst 26 Dec 12, 2022
🧿 Build navigation or menu for Laravel and Awes.io. Unlimited complexity and depth, with permissions and sorting support.

Navigator Laravel package that can easily create navigation menus of any complexity. With support for routing, permissions, sorting, rendering depth,

Awes.io 47 Jul 18, 2022
A Event Management system - EMS build with Laravel and Vuejs

Event Management system - EMS A Event Management system - EMS build with Laravel and Vuejs Both FE & BE project folders has own README.md files for in

hassan 5 Jul 21, 2022
A starter template from which to build Laravel + Vite apps

Stack The Laravel framework is fast, clean, and filled with best practices. In this stack, it will handle the backend as an API. The Laravel Vite pack

null 7 Nov 14, 2022
Api first backend boilerplate build with laravel 🎯 you can use as a template 😉

Laravel Backend Template i use this as a starting point for my backend projects , it saves time with basic auth functionalities and has code examples

Hijen EL Khalifi 4 Nov 14, 2022
Start WordPress Plugin Development with React JS Package in just few steps

React Js & Wordpress Plugin Package Start WordPress Plugin Development with React JS Package in just few steps Getting Started with this Setup Clone t

Devang Vachheta 2 Aug 17, 2022
Build a full-featured administrative interface in ten minutes

⛵ laravel-admin is administrative interface builder for laravel which can help you build CRUD backends just with few lines of code. Documentation | 中文

Song 10.7k Dec 30, 2022
Wave - The Software as a Service Starter Kit, designed to help you build the SAAS of your dreams 🚀 💰

Introduction Wave is a Software as a Service Starter Kit that can help you build your next great idea ?? . Wave is built with Laravel, Voyager, Tailwi

null 4.2k Jan 4, 2023