Skip to content

Commit

Permalink
added docs folder
Browse files Browse the repository at this point in the history
  • Loading branch information
bansikah22 committed Sep 12, 2024
1 parent 04a2cee commit 57f5be4
Show file tree
Hide file tree
Showing 5 changed files with 103 additions and 0 deletions.
Binary file added docs/Architecture-user-fullstact.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file added docs/file.txt
Empty file.
41 changes: 41 additions & 0 deletions docs/file.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
version: "3.8"

networks:
user-net:
driver: bridge

services:
traefik:
image: traefik:v3.0
command:
- "--api.insecure=true"
- "--providers.docker=true"
- "--entrypoints.web.address=:80"
ports:
- "80:80" # Expose HTTP
- "8080:8080" # Expose Traefik dashboard
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro" # Allow Traefik to listen to Docker
networks:
- user-net


user-frontend:
image: user-frontend:1.0
labels:
- "traefik.enable=true"
- "traefik.http.routers.frontend.rule=Host(`frontend.localhost`)"
- "traefik.http.services.frontend.loadbalancer.server.port=80"
depends_on:
- user-backend
networks:
- user-net

user-backend:
image: user-backend:1.0
labels:
- "traefik.enable=true"
- "traefik.http.routers.backend.rule=Host(`backend.localhost`)"
- "traefik.http.services.backend.loadbalancer.server.port=8082"
networks:
- user-net
50 changes: 50 additions & 0 deletions docs/notes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
docker network create web
docker-compose up -d

sudo systemctl stop nginx
sudo systemctl stop apache2

sudo lsof -i :80
sudo lsof -i :8080


helm create frontend-chart

helm install frontend-release ./frontend-chart

helm install backend-release ./backend-chart

##Verify Deployment
```bash
#deploying backend-chart
kubectl get pods
kubectl get services
eval $(minikube docker-env)
helm install backend-release ./backend-chart
kubectl get pods
kubectl get service
minikube ip #to get the ip address of minikube service 192.168.49.2
minikube service backend-release-backend-chart --url # http://192.168.49.2:32040
#Always comment the liveness and readiness checks in the values.yaml file of the chart
####
kubectl get ingresses
helm uninstall frontend-release
kubectl get deployments
###steps to deploy frontend-release
helm create frontend-chart
helm install frontend-release frontend-chart
kubectl get pods
kubectl get services
minikube ip
minikube service frontend-release-frontend-chart --url ##http://192.168.49.2:31182
##Debuging images
docker build -t user-frontend:1.0 .
minikube image load user-frontend:1.0
minikube ssh -- docker system prune -af

##Rebuild or upgrage deployment
helm upgrade --install frontend-release frontend-chart
helm upgrade --install backend-release backend-chart
const API_BASE_URL = "http://192.168.49.2:8082"; // Replace with Minikube service URL if needed
if we are using minikube
```
12 changes: 12 additions & 0 deletions docs/trafik.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
entryPoints:
web:
address: ":80"
admin:
address: ":8080"

api:
dashboard: true

providers:
docker:
exposedByDefault: false

0 comments on commit 57f5be4

Please sign in to comment.