All Projects → nahidulhasan → Laravel Docker K8s

nahidulhasan / Laravel Docker K8s

Running Laravel project using Docker and Deploying using Kubernetes

Projects that are alternatives of or similar to Laravel Docker K8s

Dockerized lara
Build your Laravel App with Redis - Mongodb - MariaDB - Nginx - php7 - zsh
Stars: ✭ 9 (-92.91%)
Mutual labels:  laravel, docker-image, docker-compose
Lumen Microservice
Lumen on Docker - Skeleton project with Nginx, MySQL & PHP 7 | Aws ECS, Google Kubernates, Azure Container Engine
Stars: ✭ 183 (+44.09%)
Mutual labels:  laravel, docker-image, docker-compose
Larakube
Laravel app deployment for auto scaled Kubernetes cluster
Stars: ✭ 157 (+23.62%)
Mutual labels:  laravel, docker-image, docker-compose
Docker Laravel
🐳 Docker Images for Laravel development
Stars: ✭ 101 (-20.47%)
Mutual labels:  laravel, docker-image, docker-compose
Bareos
Docker image for Bareos
Stars: ✭ 74 (-41.73%)
Mutual labels:  docker-image, docker-compose
Rubel
Rubel is a cms built with Laravel and React.
Stars: ✭ 70 (-44.88%)
Mutual labels:  laravel, docker-compose
Docker Superset
Repository for Docker Image of Apache-Superset. [Docker Image: https://hub.docker.com/r/abhioncbr/docker-superset]
Stars: ✭ 86 (-32.28%)
Mutual labels:  docker-image, docker-compose
Porter
A docker based multi-site setup for local PHP development. Inspired by Laravel Valet, Homestead and Vessel.
Stars: ✭ 92 (-27.56%)
Mutual labels:  laravel, docker-compose
Scala Graalvm Docker
Docker images to build and generate native artifacts using GraalVM
Stars: ✭ 60 (-52.76%)
Mutual labels:  docker-image, docker-compose
Docker Compose Lamp
A basic LAMP stack environment built using Docker Compose.
Stars: ✭ 1,284 (+911.02%)
Mutual labels:  docker-image, docker-compose
Fusionauth Containers
Container definitions for docker, kubernetes, helm, and whatever containers come next!
Stars: ✭ 101 (-20.47%)
Mutual labels:  docker-image, docker-compose
Dockerfiles
lots of dockerfiles, based on alpine
Stars: ✭ 69 (-45.67%)
Mutual labels:  docker-image, docker-compose
Directus Docker
Directus 6 Docker — Legacy Container [EOL]
Stars: ✭ 68 (-46.46%)
Mutual labels:  docker-image, docker-compose
Cabot Docker
Docker Images to build full cabot environment
Stars: ✭ 75 (-40.94%)
Mutual labels:  docker-image, docker-compose
Poco
Poco will help you to organise and manage Docker, Docker-Compose, Kubernetes, Openshift projects of any complexity using simple YAML config files to shorten the route from finding your project to initialising it in your local environment.
Stars: ✭ 66 (-48.03%)
Mutual labels:  docker-image, docker-compose
Docker Multistreamer
Dockerized multistreamer
Stars: ✭ 90 (-29.13%)
Mutual labels:  docker-image, docker-compose
Dockernotes
Docker入门精华版
Stars: ✭ 107 (-15.75%)
Mutual labels:  docker-image, docker-compose
Gluu Docker
Project for Gluu Docker files
Stars: ✭ 103 (-18.9%)
Mutual labels:  docker-compose, minikube
Dlaravel
Laravel and Docker
Stars: ✭ 108 (-14.96%)
Mutual labels:  laravel, docker-compose
Leanote Dockerfile
docker-compose for leanote.
Stars: ✭ 49 (-61.42%)
Mutual labels:  docker-image, docker-compose

Laravel-docker-kubernetes

From here you will be able to know that how you will run your Laravel project using Docker and how you will deploy using Kubernetes(minikube)

Run the project using docker

Clone the project
 

Now run the following command from your terminal one by one. Running the commands be sure that you have installed docker.You will get install instructions from this link

docker-compose build

docker-compose up -d

Now browse project

http://localhost:8083/

Deploy the project using Kubernetes

At first build image running the command:

docker build . -f ./deploy/dockerfile -t laravel:v4

Now login in docker hub. Running the command be sure that you have created an account in docker hub. If not go to the link and create account.

docker login

Now run the following command for Pushing image in docker registry.In the command nahid35 is my docker id and laravel is repository name and v4 is tag name. Modify command according to your docker id, repository name and tag name.

docker tag laravel:v4 docker.io/nahid35/laravel:v4

docker push docker.io/nahid35/laravel:v4

Now run minikube. Running the commands be sure that you have installed minikube. If not installed, you can get install instructions from this link

minikube start

Now run the following commands for deploying your project:


kubectl apply -f deploy/app/secret.yml

kubectl apply -f deploy/app/deploy.yml

kubectl apply -f deploy/app/service.yml


Now run the following commands to see minikube dashboard:

minikube dashboard

You will get this url :

http://192.168.99.100:30000/#!/overview?namespace=default

kubectl get svc

Running above command you will get following information:

NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubernetes ClusterIP 10.0.0.1 443/TCP 27d
laravel-api LoadBalancer 10.0.0.11 80:32676/TCP 4m

Now you can browse your project using following url :

 http://192.168.99.100:32676/

Extra Note :

  • If you want to use different database or different port etc, You have to change in the docker-compose.yml file.
  • If you modify .env file, You have to run following command:
     base64 -b -i deploy/env/.env
  • Running the command you will get base 64 encoded string. Put the string in deploy\app\secret.yml. And then run the commands for deploying.
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].