mirror of
https://github.com/bitinflow/laravel-docker-k8s.git
synced 2026-03-13 13:35:52 +00:00
update readme
This commit is contained in:
@@ -15,7 +15,7 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: laravel-app
|
- name: laravel-app
|
||||||
image: docker.io/nahid35/laravel:v4
|
image: docker.io/pietheinstrengholt/laravel-docker-k8s:v1
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: app-secret
|
- name: app-secret
|
||||||
mountPath: "/var/www/html/secret"
|
mountPath: "/var/www/html/secret"
|
||||||
|
|||||||
21
readme.md
21
readme.md
@@ -13,19 +13,16 @@ git clone https://github.com/pietheinstrengholt/laravel-docker-k8s
|
|||||||
|
|
||||||
```sh
|
```sh
|
||||||
docker-compose build
|
docker-compose build
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
docker-compose up -d
|
docker-compose up -d
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Now browse project
|
Now browse project
|
||||||
|
|
||||||
```
|
```
|
||||||
http://localhost:8181/
|
http://localhost:8181/
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Deploy the project using Kubernetes
|
### Deploy the project using Kubernetes
|
||||||
@@ -34,35 +31,33 @@ At first build image running the command:
|
|||||||
|
|
||||||
```sh
|
```sh
|
||||||
docker build . -f ./deploy/dockerfile -t laravel-on-k8s:v1
|
docker build . -f ./deploy/dockerfile -t laravel-on-k8s:v1
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
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](https://hub.docker.com/) and create account.
|
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](https://hub.docker.com/) and create account.
|
||||||
|
|
||||||
```
|
```
|
||||||
docker login
|
docker login
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Now run the following command for Pushing image in docker registry.In the command pietheinstrengholt is my docker id and laravel-on-k8s is repository name and v1 is tag name. Modify command according to your docker id, repository name and tag name.
|
Now run the following command for Pushing image in docker registry.In the command pietheinstrengholt is my docker id and laravel-on-k8s is repository name and v1 is tag name. Modify command according to your docker id, repository name and tag name.
|
||||||
|
|
||||||
```
|
```
|
||||||
docker tag laravel-on-k8s:v1 docker.io/pietheinstrengholt/laravel-on-k8s:v1
|
docker tag laravel-on-k8s:v1 docker.io/pietheinstrengholt/laravel-on-k8s:v1
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
```
|
```
|
||||||
docker push docker.io/pietheinstrengholt/laravel-on-k8s:v1
|
docker push docker.io/pietheinstrengholt/laravel-on-k8s:v1
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Now run minikube. Running the commands be sure that you have installed minikube. If not installed, you can get install instructions from this [link](https://kubernetes.io/docs/tasks/tools/install-minikube/)
|
Now run minikube. Running the commands be sure that you have installed minikube. If not installed, you can get install instructions from this [link](https://kubernetes.io/docs/tasks/tools/install-minikube/)
|
||||||
|
|
||||||
```
|
```
|
||||||
minikube start
|
minikube start
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If you want to run this using your own image, change the following file: deploy/app/deploy.yml
|
||||||
|
image: docker.io/pietheinstrengholt/laravel-docker-k8s:v1
|
||||||
|
|
||||||
Now run the following commands for deploying your project:
|
Now run the following commands for deploying your project:
|
||||||
|
|
||||||
```
|
```
|
||||||
@@ -75,20 +70,17 @@ Now run the following commands to see minikube dashboard:
|
|||||||
|
|
||||||
```
|
```
|
||||||
minikube dashboard
|
minikube dashboard
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
You will get this url :
|
You will get this url :
|
||||||
|
|
||||||
```
|
```
|
||||||
http://192.168.99.100:30000/#!/overview?namespace=default
|
http://192.168.99.100:30000/#!/overview?namespace=default
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
```
|
```
|
||||||
kubectl get svc
|
kubectl get svc
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Running above command you will get following information:
|
Running above command you will get following information:
|
||||||
@@ -104,7 +96,14 @@ Now you can browse your project using following url :
|
|||||||
|
|
||||||
```
|
```
|
||||||
http://192.168.99.100:32676/
|
http://192.168.99.100:32676/
|
||||||
|
```
|
||||||
|
|
||||||
|
### TODO
|
||||||
|
Run the images straight from the docker.io hub:
|
||||||
|
|
||||||
|
```
|
||||||
|
kubectl run --image=docker.io/pietheinstrengholt/laravel-docker-k8s:v1 laravel-docker-k8s --port=8181 --env="DOMAIN=cluster"
|
||||||
|
kubectl expose deployment laravel-docker-k8s --port=8181 --name=laravel-docker-k8s
|
||||||
```
|
```
|
||||||
|
|
||||||
### Extra Note :
|
### Extra Note :
|
||||||
|
|||||||
Reference in New Issue
Block a user