Giter VIP home page Giter VIP logo

laravel-docker-workflow's Introduction

Laravel Docker 2019

git clone [email protected]:bayareawebpro/laravel-docker.git
DB_HOST=mysql
CACHE_DRIVER=redis
SESSION_DRIVER=redis
QUEUE_CONNECTION=redis
REDIS_CLIENT=predis
REDIS_HOST=redis
DB_DATABASE=laravel
DB_USERNAME=laravel
DB_PASSWORD=laravel

Environment

  • MySQL 5.7
  • PHP-FPM 7.3
  • NPM (latest)
  • NGINX (latest)
  • Laravel (latest)
  • Horizon (latest)
  • OpCache (latest)
  • xDebug (optional)
  • Memcached (latest)
  • Supervisor (latest)

Extensions

docker-compose exec php bash
composer check-platform-reqs

Build Images

  • docker-compose build

Mange Services

  • docker-compose up (listen)
  • docker-compose up -d (detach)
  • docker-compose down

Bash Shell

  • docker-compose exec php bash
  • docker-compose exec mysql bash
  • docker-compose exec nginx bash
  • docker-compose exec redis bash
  • docker-compose exec worker bash
  • exit

Copy Files

  • docker ps (list container IDs)
  • docker cp <containerId>:/file/path/within/container /my/path
  • docker cp ae732473905f:/usr/local/etc ~/Desktop
  • docker rm --force <containerId>

Nginx

  • docker-compose exec nginx nginx -s reload
  • docker-compose exec nginx bash
  • service nginx status
  • service nginx restart

PHP-FPM

  • docker-compose exec php bash
  • kill -USR2 1

Database

The database host DB_HOST=mysql references the docker service IP.

  • docker-compose exec mysql bash
  • mysql -u root -plaravel

Redis Cache

The database host REDIS_HOST=redis references the docker service IP.

  • docker-compose exec redis bash

Configure as Auto-Expiring Cache

redis-cli
config set maxmemory 256mb
config set maxmemory-policy allkeys-lru
config rewrite

DigitalOcean Image

git init .
git remote add origin <repository-url>
git pull origin master

laravel-docker-workflow's People

Contributors

bayareawebpro avatar

Watchers

 avatar  avatar

Forkers

codemonkey76

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.