Skip to content

Commit

Permalink
combining publishing to dockerhub and deploying to eks
Browse files Browse the repository at this point in the history
  • Loading branch information
Delyc committed Dec 19, 2024
1 parent ab76e41 commit dd17915
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 57 deletions.
16 changes: 6 additions & 10 deletions .github/workflows/deploy-demo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:
workflow_dispatch:

jobs:

release-publish:
runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -98,15 +97,12 @@ jobs:
- name: Deploy to EKS
run: |
kubectl rollout restart deployment/mpm-backend
kubectl apply -f k8s/deployments/mpm-backend.yaml
kubectl rollout restart deployment/mpm-frontend
kubectl apply -f k8s/deployments/mpm-frontend.yaml
kubectl apply -f k8s/services/mpm-frontend.yaml
kubectl apply -f k8s/services/mpm-backend.yaml
kubectl rollout restart deployment/mpm-backend
kubectl apply -f k8s/deployments/mpm-backend.yaml
kubectl rollout restart deployment/mpm-frontend
kubectl apply -f k8s/deployments/mpm-frontend.yaml
kubectl apply -f k8s/services/mpm-frontend.yaml
kubectl apply -f k8s/services/mpm-backend.yaml
58 changes: 11 additions & 47 deletions k8s/deployments/mpm-backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,31 @@ kind: Deployment
metadata:
name: mpm-backend
spec:
progressDeadlineSeconds: 600
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
app: mpm-backend
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
creationTimestamp: null
labels:
app: mpm-backend
spec:
containers:
- env:
- name: mpm-backend
image: enaccess/micropowermanager-backend:latest
imagePullPolicy: Always
ports:
- containerPort: 80
env:
- name: APP_NAME
value: MicroPowerManager
- name: APP_ENV
value: demo
- name: APP_KEY
valueFrom:
secretKeyRef:
key: APP_KEY
name: mpm-secrets
key: APP_KEY
- name: APP_DEBUG
value: "false"
- name: MPM_LOAD_DEMO_DATA
Expand All @@ -40,65 +37,32 @@ spec:
- name: DB_HOST
valueFrom:
secretKeyRef:
key: DB_HOST
name: mpm-secrets
key: DB_HOST
- name: DB_PORT
value: "3306"
- name: DB_DATABASE
value: micro_power_manager
- name: DB_USERNAME
valueFrom:
secretKeyRef:
key: DB_USERNAME
name: mpm-secrets
key: DB_USERNAME
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
key: DB_PASSWORD
name: mpm-secrets
key: DB_PASSWORD
- name: REDIS_HOST
value: redis-db-service
- name: REDIS_PORT
value: "6379"
- name: JWT_SECRET
valueFrom:
secretKeyRef:
key: JWT_SECRET
name: mpm-secrets
key: JWT_SECRET
- name: CACHE_DRIVER
value: redis
- name: QUEUE_DRIVER
value: database
image: enaccess/micropowermanager-backend:latest
imagePullPolicy: Always
name: mpm-backend
ports:
- containerPort: 80
protocol: TCP
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
status:
availableReplicas: 1
conditions:
- lastTransitionTime: "2024-12-13T05:47:18Z"
lastUpdateTime: "2024-12-13T05:47:18Z"
message: Deployment has minimum availability.
reason: MinimumReplicasAvailable
status: "True"
type: Available
- lastTransitionTime: "2024-12-13T05:46:55Z"
lastUpdateTime: "2024-12-13T05:47:18Z"
message: ReplicaSet "mpm-backend-7b59564f89" has successfully progressed.
reason: NewReplicaSetAvailable
status: "True"
type: Progressing
observedGeneration: 1
readyReplicas: 1
replicas: 1
updatedReplicas: 1

0 comments on commit dd17915

Please sign in to comment.