All Projects → bagart → laradock-multi

bagart / laradock-multi

Licence: MIT license
LaraDock for MSA dev env with Node.JS app

Programming Languages

shell
77523 projects
Dockerfile
14818 projects
PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to laradock-multi

Laradock
Full PHP development environment for Docker.
Stars: ✭ 11,064 (+48004.35%)
Mutual labels:  php-environment, laradock
deck
DECK is a powerful and high performant local web development studio unlike any other.
Stars: ✭ 1,414 (+6047.83%)
Mutual labels:  laradock
Docker Node
Official Docker Image for Node.js 🐳 🐢 🚀
Stars: ✭ 6,873 (+29782.61%)
Mutual labels:  docker-node
docker lnmp
一键部署基于docker的LAMP环境,并利用electron + vue 提供gui管理。+++ 可配置的多进程php扩展安装
Stars: ✭ 37 (+60.87%)
Mutual labels:  docker-php
docker-php
Docker build php development environment
Stars: ✭ 40 (+73.91%)
Mutual labels:  docker-php
docker-lemp
A single container LEMP complete fullstack with latest release of PHP7.4.33, 8.0.26 & 8.1.13/8.2RC and MySQL, nginx, PostgreSQL, phalcon, swoole, mailcatcher, beanstalkd, elasticsearch, memcached, redis, adminer and all you ever need; on top alpine3.15
Stars: ✭ 106 (+360.87%)
Mutual labels:  docker-php
yii2-laradock
Laradock pre-configured for Yii2 Framework (https://github.com/LaraDock/laradock)
Stars: ✭ 16 (-30.43%)
Mutual labels:  laradock
laradock-cli
[Unmaintained] Your new best friend for Laradock.
Stars: ✭ 15 (-34.78%)
Mutual labels:  laradock
laradock env
Laradock ENV is a wrapper with command tools for build AND management of Laradock
Stars: ✭ 29 (+26.09%)
Mutual labels:  laradock

LaraDock Multi

Laradock wrapper template for running multiple related projects with different versions of PHP and Node.js such as Microservice Architecture (MSA)

Demo used

Demo services

localhost on dev env

Instruction for configure step-by-step

  • Integrate Demo of usage with Cloud env (Yandex Cloud for example as simple and useful)

Commands

  • cmd/bash.sh laravel - connect to LaraDock-multi service
  • cmd/logs.sh - waiting for all logs
  • cmd/logs.sh nginx laravel - waiting for logs of nginx and laravel workers or cli
  • cmd/ps.sh - shop details about LaraDock-multi services
  • cmd/rebuild.sh - remove, load updates and rebuild each one LaraDock-multi services
  • cmd/rebuild.sh laravel-fpm nginx rebuild only laravel-fpm and nginx
  • cmd/stop.sh - stop all services
  • cmd/stop.sh nginx api - stop services: nginx and api
  • cmd/test_tor_proxy.sh - test TOR proxy
  • cmd/up.sh - start all services
  • cmd/up.sh nginx api - start services: nginx and api

Setup

Install Docker-CE with Docker-compose and git

apt install docker docker-compose git

Download Laradock-Multi with laradock

git clone https://github.com/bagart/laradock-multi.git
cd laradock-multi

Autoconfigure and Auto-deploy

You cal automate Configure, Upgrade and download Laradock with command

cmd/deploy.sh

Force Upgrade Laradock Multi. It's will remove laradock path

cmd/deploy.sh upgrade

Manual Configure(upgrade) multi-env

git clone https://github.com/Laradock/laradock.git
cp ./.laradock-multi/. ./laradock/ -r

Also, you can use git submodule add https://github.com/Laradock/laradock.git

Install projects

PHP Site like Laravel

I will use dummy laravel-like php site for demo

mkdir projects/laravel
mkdir projects/laravel/public
echo '<?php phpinfo();' >> projects/laravel/public/index.php

But you can install original laravel or your exist project

composer create-project --prefer-dist laravel/laravel projects/laravel

Node.JS

I will use pretty CoreUi admin template on ReactJS

git clone https://github.com/coreui/coreui-free-react-admin-template.git projects/dashboard
cp laradock/nginx/sites/dashboard.conf.example laradock/nginx/sites/dashboard.conf

It's already added: dashboard docker in docker-compose.multi.yml. You can copy this section for using with other node.js projects

Configure

Feel free to changing .laradock-multi options

Using

Using is similar to https://github.com/bagart/laradock_env

cmd/up.sh

Important note:

  • Nginx crush in runtime after load config, if some dependency service (php-fpm, node.js) not started. So, immediately cmd/ps.sh will return success result and failed in next call
  • laravel service is empty by default
  • dashboard not configured by default

HTTP Service

Alternative

docker-compose override

Also you can use docker-compose.override.yml https://docs.docker.com/compose/extends/. But it's depends on platform

cd laradock;
cp docker-compose.multi.yml docker-compose.override.yml

and remove all typical service like db or docker-in-docker Result:

  • docker-compose ps will equal:
    • docker-compose ps -f docker-compose.yml -f docker-compose.override.yml
  • docker-compose logs will equal:
    • docker-compose logs -f docker-compose.yml -f docker-compose.override.yml

But docker-compose up without specs will failed

CMD from project

Open default preoject with IDE

Switch to internal bash terminal

use Laradock-multi:

cmd/up.sh

copy this dir to each new project

cp -r projects/default/cmd projects/laravel/cmd 

Update

git pull
cd laradock
git pull
cd ..

add all changes

  • from: diff .laradock-multi/docker-compose.yml.orig laradock/docker-compose.yml

    • to laradock/docker-compose.multiple.yml
      • workspace to api, laravel, default
      • php-fpm to api-fpm, laravel-fpm, php-fpm
      • each one with same name
  • from: diff .laradock-multi/env-example.orig laradock/env-example

    • to laradick/.env

Rebuild each Laradock-Multi service

cmd/rebuild.sh

Structure

  • .laradock-multi/ - custom services path for LaraDock
  • cmd/ - simple command for using with autocomplete
    • .jump_to_laradock.sh - cd to LaraDock path (for internal use)
    • bash.sh - connect to LaraDock-multi service
    • logs.sh - logs -f all LaraDock-multi service or cmd/logs.sh laravel nginx for listed
    • ps.sh - show info for LaraDock-multi service
    • rebuild.sh - remove, pull and rebuild each one LaraDock-multi services or cmd/rebuild.sh laravel nginx for listed
    • stop.sh - stop LaraDock-multi services or cmd/stop.sh laravel nginx for listed
    • up.sh - start all LaraDock-multi services or cmd/up.sh laravel nginx for listed
  • dumps/ - path for DB dumps. That will be mount inside DB-service
  • laradock/ - original laradock + laradock-multi
  • projects/ - custom projects
    • api/ - API project with PHP 5.6
    • dashboard/ - CoreUI project with NodeJS+React (after install)
    • default/ - Default localhost project for internal use or service list
    • laravel/ - Laravel project with PHP 7.4 (after install)
  • Readme.md - Readme file with instructions
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].